[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Fix afl-fuzz error
From: |
Gavin D. Smith |
Subject: |
branch master updated: Fix afl-fuzz error |
Date: |
Thu, 06 May 2021 15:31:05 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new a11612f Fix afl-fuzz error
a11612f is described below
commit a11612ff665391142fc8adb90796741cabb3b683
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Thu May 6 20:30:54 2021 +0100
Fix afl-fuzz error
* info/info-utils.c (scan_reference_label): Avoid advancing
pointer if we are already at the end of the buffer, in the case
of a malformed input file. Report from Nathaniel Beaver for file
generated by afl-fuzz.
---
ChangeLog | 9 +++++++++
info/info-utils.c | 3 ++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 1090ebf..3b82b45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,15 @@
2021-05-06 Gavin Smith <gavinsmith0123@gmail.com>
Fix afl-fuzz error
+
+ * info/info-utils.c (scan_reference_label): Avoid advancing
+ pointer if we are already at the end of the buffer, in the case
+ of a malformed input file. Report from Nathaniel Beaver for file
+ generated by afl-fuzz.
+
+2021-05-06 Gavin Smith <gavinsmith0123@gmail.com>
+
+ Fix afl-fuzz error
* info/info-utils.c (copy_input_to_output): Avoid calling
copy_converting with negative argument in case of malformed
diff --git a/info/info-utils.c b/info/info-utils.c
index 998243f..e692183 100644
--- a/info/info-utils.c
+++ b/info/info-utils.c
@@ -1324,7 +1324,8 @@ scan_reference_label (REFERENCE *entry, int in_index)
entry->end = inptr - input_start;
/* Colon after label. */
- skip_input (1);
+ if (*inptr)
+ skip_input (1);
/* Don't mess up the margin of a menu description. */
if (entry->type == REFERENCE_MENU_ITEM)
write_extra_bytes_to_output (" ", 1);