diff options
author | Nikias Bassen | 2017-01-02 00:19:18 +0100 |
---|---|---|
committer | Nikias Bassen | 2017-01-02 00:19:18 +0100 |
commit | 3abf4ffb312f1ebb040e0389f4409312e0539426 (patch) | |
tree | ab7ed9a93468ac000c2fc2d4dd74a853f5d8ee15 /src/xplist.c | |
parent | 02e9c0a590a27b3a98da03f3d7bfcf25621ff7fc (diff) | |
download | libplist-3abf4ffb312f1ebb040e0389f4409312e0539426.tar.gz libplist-3abf4ffb312f1ebb040e0389f4409312e0539426.tar.bz2 |
xplist: Make sure to not parse for entities in empty strings
Diffstat (limited to 'src/xplist.c')
-rw-r--r-- | src/xplist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xplist.c b/src/xplist.c index ddd962e..b1bdd46 100644 --- a/src/xplist.c +++ b/src/xplist.c @@ -633,7 +633,7 @@ static int unescape_entities(char *str, size_t *length) { size_t i = 0; size_t len = *length; - while (i < len-1) { + while (len > 0 && i < len-1) { if (str[i] == '&') { char *entp = str + i + 1; while (i < len && str[i] != ';') { |