diff options
| -rw-r--r-- | src/xplist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xplist.c b/src/xplist.c index 36db07d..9825a28 100644 --- a/src/xplist.c +++ b/src/xplist.c | |||
| @@ -662,7 +662,9 @@ static void node_from_xml(parse_ctx ctx, plist_t *plist) | |||
| 662 | return; | 662 | return; |
| 663 | } | 663 | } |
| 664 | if (*(ctx->pos-1) == '/') { | 664 | if (*(ctx->pos-1) == '/') { |
| 665 | tag[ctx->pos - p - 1] = '\0'; | 665 | int idx = ctx->pos - p - 1; |
| 666 | if (idx < taglen) | ||
| 667 | tag[idx] = '\0'; | ||
| 666 | is_empty = 1; | 668 | is_empty = 1; |
| 667 | } | 669 | } |
| 668 | ctx->pos++; | 670 | ctx->pos++; |
