diff options
author | Mattias Andrée <maandree@kth.se> | 2020-06-04 08:23:40 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-06-04 08:23:40 +0200 |
commit | 9fd4e8c75d281ea6783344c5ee13e39777b59bd7 (patch) | |
tree | 10f372691b4654abd1841385f9b811d7cae8f8f4 /util.c | |
parent | Break trigraph sequences in trace output (diff) | |
download | sctrace-9fd4e8c75d281ea6783344c5ee13e39777b59bd7.tar.gz sctrace-9fd4e8c75d281ea6783344c5ee13e39777b59bd7.tar.bz2 sctrace-9fd4e8c75d281ea6783344c5ee13e39777b59bd7.tar.xz |
Bug fix: use inclusive check to test parsed long int fits in int
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -92,7 +92,7 @@ xfopen(const char *file, const char *mode) tmp = strtol(num, (void *)&num, 10); if (!errno && tmp >= 0 && #if INT_MAX < LONG_MAX - tmp < INT_MAX && + tmp <= INT_MAX && #endif !*num) { ret = fdopen((int)tmp, mode); |