diff options
| author | 2017-01-02 00:19:18 +0100 | |
|---|---|---|
| committer | 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) | |||
| 633 | { | 633 | { |
| 634 | size_t i = 0; | 634 | size_t i = 0; |
| 635 | size_t len = *length; | 635 | size_t len = *length; |
| 636 | while (i < len-1) { | 636 | while (len > 0 && i < len-1) { |
| 637 | if (str[i] == '&') { | 637 | if (str[i] == '&') { |
| 638 | char *entp = str + i + 1; | 638 | char *entp = str + i + 1; |
| 639 | while (i < len && str[i] != ';') { | 639 | while (i < len && str[i] != ';') { |
