diff options
| author | 2026-01-21 18:28:45 +0100 | |
|---|---|---|
| committer | 2026-01-21 18:28:45 +0100 | |
| commit | 502eb2a10201e98f247186672add810e54afc15b (patch) | |
| tree | 560bbbce26814d0f9616edcdbeaffa6e967b35d2 | |
| parent | 80c2fe807308475d183ae62cc05766f3caee0463 (diff) | |
| download | libplist-502eb2a10201e98f247186672add810e54afc15b.tar.gz libplist-502eb2a10201e98f247186672add810e54afc15b.tar.bz2 | |
Fixes #285
Credit to @ylwango613 for reporting.
| -rw-r--r-- | src/bplist.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/bplist.c b/src/bplist.c index 559830f..e542d6c 100644 --- a/src/bplist.c +++ b/src/bplist.c @@ -1286,18 +1286,17 @@ static void write_uid(bytearray_t * bplist, uint64_t val) byte_array_append(bplist, (uint8_t*)&val + (8-size), size); } -static int is_ascii_string(char* s, int len) +static int is_ascii_string(const char* s, size_t len) { - int ret = 1, i = 0; - for(i = 0; i < len; i++) - { - if ( !isascii( s[i] ) ) - { - ret = 0; - break; - } - } - return ret; + int ret = 1; + size_t i = 0; + for (i = 0; i < len; i++) { + if ( !isascii( s[i] ) ) { + ret = 0; + break; + } + } + return ret; } plist_err_t plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length) |
