From f13bedd9dc1cd9a6e373bf686475e8713c10a605 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 27 May 2011 09:48:45 -0700 Subject: smsutil: Fix missing error handling for strtol function --- src/smsutil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/smsutil.c b/src/smsutil.c index e7813994..7a1b33d2 100644 --- a/src/smsutil.c +++ b/src/smsutil.c @@ -3160,12 +3160,14 @@ void status_report_assembly_expire(struct status_report_assembly *assembly, static int sms_tx_load_filter(const struct dirent *dent) { char *endp; - guint8 seq; + long seq; if (dent->d_type != DT_REG) return 0; seq = strtol(dent->d_name, &endp, 10); + if (seq == LONG_MIN || seq == LONG_MAX) + return 0; if (*endp != '\0') return 0; -- cgit v1.2.3