summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2022-10-10 14:58:29 -0400
committerAllen Winter <allen.winter@kdab.com>2022-10-10 15:00:42 -0400
commiteeccee80d0485bdd3951924b294a82e8bc39a5f8 (patch)
tree48e6928b127d3a995f36cb9e7cdc7c856555236e
parentd67034b31cebe0db3ca65342813336b123921a15 (diff)
downloadlibical-git-eeccee80d0485bdd3951924b294a82e8bc39a5f8.tar.gz
Revert "src/libical/icalparser.c - fix a fuzz issue for integer overflow"
This reverts commit ca3e2ad983771b90da259994b7a6d7de1fd1abdc.
-rw-r--r--ReleaseNotes.txt4
-rw-r--r--src/libical/icalparser.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt
index 4f41de4c..1f2de88d 100644
--- a/ReleaseNotes.txt
+++ b/ReleaseNotes.txt
@@ -3,7 +3,7 @@ Release Highlights
Version 3.0.16 (UNRELEASED):
----------------------------
- *
+ * Fix a regression in 3.0.15 that limited how many lines could be processed in one call to icalparser_parse()
Version 3.0.15 (06 October 2022):
---------------------------------
@@ -13,7 +13,7 @@ Version 3.0.15 (06 October 2022):
to work properly between years 1902 and 10k.
* Fix x-property comma handling and escaping
* Built-in timezones updated to tzdata2022d (now with a VTIMEZONE for each time zone alias)
- * Fix fuzzer issues
+ * Fix a fuzzer issue
* Handle unreachable-code compile warnings with clang
* Ensure all vanew_foo() calls finish with (void*)0 (not 0)
diff --git a/src/libical/icalparser.c b/src/libical/icalparser.c
index 3695bb62..d1aaa268 100644
--- a/src/libical/icalparser.c
+++ b/src/libical/icalparser.c
@@ -630,7 +630,6 @@ icalcomponent *icalparser_parse(icalparser *parser,
icalparser_line_gen_func line_gen_func)
{
char *line;
- unsigned int cnt = 0;
icalcomponent *c = 0;
icalcomponent *root = 0;
icalerrorstate es = icalerror_get_error_state(ICAL_MALFORMEDDATA_ERROR);
@@ -641,7 +640,6 @@ icalcomponent *icalparser_parse(icalparser *parser,
icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR, ICAL_ERROR_NONFATAL);
do {
- cnt++;
line = icalparser_get_line(parser, line_gen_func);
if ((c = icalparser_add_line(parser, line)) != 0) {
@@ -681,7 +679,7 @@ icalcomponent *icalparser_parse(icalparser *parser,
icalmemory_free_buffer(line);
cont = 1;
}
- } while (cont && cnt < TMP_BUF_SIZE);
+ } while (cont);
icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR, es);