static
int parse_arguments(char **argv)
{
+ int sscanf_ret;
const char *domain_type_string = NULL;
const char *buffer_usage_type_string = NULL;
const char *buffer_usage_threshold_type = NULL;
}
/* Number of notification to expect */
- sscanf(nr_expected_notifications_string, "%d", &nr_expected_notifications);
+ sscanf_ret = sscanf(nr_expected_notifications_string, "%d",
+ &nr_expected_notifications);
+ if (sscanf_ret != 1) {
+ printf("error: Invalid nr_expected_notifications, sscanf returned %d\n",
+ sscanf_ret);
+ goto error;
+ }
/* Put notify action in a group. */
if (!strcasecmp("1", use_action_group_value)) {