aboutsummaryrefslogtreecommitdiffstats
path: root/unpack.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 /unpack.c
parent4251c280acbddda225bea6be79c4b3dbe36c2193 (diff)
downloadpack-383c232bc2f1661923177437e48ea4cf6bd4e304.tar.gz
pack-383c232bc2f1661923177437e48ea4cf6bd4e304.tar.xz
pack-383c232bc2f1661923177437e48ea4cf6bd4e304.zip
use safe_islower to avoid UB
Diffstat (limited to 'unpack.c')
-rw-r--r--unpack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unpack.c b/unpack.c
index 995eac8..ad38a09 100644
--- a/unpack.c
+++ b/unpack.c
@@ -73,7 +73,7 @@ static void read_fields(struct dest dest, const void *src_, enum pack_endian end
double d = ieee754b64_deserialise(val.unsigned_);
val.d = d;
tr_debug("val.d: %f", val.d);
- } else if (islower((char)dest.type)) {
+ } else if (safe_islower((char)dest.type)) {
intmax_t vals;
if (!(val.unsigned_ & (UINTMAX_C(1) << (s * 8 - 1)))) {
vals = val.unsigned_;