aboutsummaryrefslogtreecommitdiffstats
path: root/pack.c
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-11-07 22:18:21 +0000
committerTomasz Kramkowski <tk@the-tk.com>2021-11-07 22:18:21 +0000
commit383c232bc2f1661923177437e48ea4cf6bd4e304 (patch)
tree6163457d1c53cad97aa36bbf9619e6bf0713107f /pack.c
parent4251c280acbddda225bea6be79c4b3dbe36c2193 (diff)
downloadpack-383c232bc2f1661923177437e48ea4cf6bd4e304.tar.gz
pack-383c232bc2f1661923177437e48ea4cf6bd4e304.tar.xz
pack-383c232bc2f1661923177437e48ea4cf6bd4e304.zip
use safe_islower to avoid UB
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack.c b/pack.c
index 5a603e0..e18455c 100644
--- a/pack.c
+++ b/pack.c
@@ -35,7 +35,7 @@ enum pack_status pack(void *buf_, size_t size, const char *fmt, ...)
size_t s;
union { uintmax_t unsigned_; intmax_t signed_; } v;
tr_debug("i: %d, fmt[i]: %c", i, fmt[i]);
- sign = islower(fmt[i]);
+ sign = safe_islower(fmt[i]);
switch (fmt[i]) {
case '>': endianness = PACK_ENDIAN_BIG; continue;
case '<': endianness = PACK_ENDIAN_LITTLE; continue;