diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-03-30 11:15:07 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2021-03-30 11:15:07 +0000 |
commit | 1a9bcdf202f062e89bb73aa9b0bfe6e3c9b4d5d9 (patch) | |
tree | a7894c50d982205760ff7f15f20a9da55a240d0a /textlist.c | |
parent | Update ChangeLog (diff) | |
download | w3m-1a9bcdf202f062e89bb73aa9b0bfe6e3c9b4d5d9.tar.gz w3m-1a9bcdf202f062e89bb73aa9b0bfe6e3c9b4d5d9.zip |
Treat textlist item number as int instead of short
cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838952
Diffstat (limited to 'textlist.c')
-rw-r--r-- | textlist.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -30,7 +30,7 @@ void pushValue(GeneralList *tl, void *s) { ListItem *it; - if (s == NULL) + if (s == NULL || tl == NULL || tl->nitem >= GENERAL_LIST_MAX) return; it = newListItem(s, NULL, tl->last); if (tl->first == NULL) { @@ -99,6 +99,9 @@ appendGeneralList(GeneralList *tl, GeneralList *tl2) if (tl && tl2) { if (tl2->first) { if (tl->last) { + if (tl->nitem + tl2->nitem > GENERAL_LIST_MAX) { + return tl; + } tl->last->next = tl2->first; tl2->first->prev = tl->last; tl->last = tl2->last; |