[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:13:01 -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 caea2ec Fix afl-fuzz error
caea2ec is described below
commit caea2ecf9a11b050c5a2e565c35d6e60818807a2
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Thu May 6 20:12:20 2021 +0100
Fix afl-fuzz error
* info/info-utils.c (copy_input_to_output): Avoid calling
copy_converting with negative argument in case of malformed
input file. Report from Nathaniel Beaver for file generated
by afl-fuzz.
---
ChangeLog | 9 +++++++++
info/info-utils.c | 7 ++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index d63be26..1090ebf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
+ input file. Report from Nathaniel Beaver for file generated
+ by afl-fuzz.
+
2021-05-04 Per Bothner <per@bothner.com>
* js/info.js (updater.navigate): Relative movement without node links.
diff --git a/info/info-utils.c b/info/info-utils.c
index d39620a..998243f 100644
--- a/info/info-utils.c
+++ b/info/info-utils.c
@@ -997,7 +997,12 @@ copy_input_to_output (long n)
else if (first_anchor < (inptr-input_start) + bytes_left)
{
/* Convert enough to pass the first anchor in input. */
- bytes_to_convert = first_anchor - (inptr-input_start) +
1;
+ bytes_to_convert = first_anchor - (inptr-input_start)+1;
+ if (bytes_to_convert < 0)
+ {
+ bytes_to_convert = bytes_left;
+ anchor_to_adjust = 0;
+ }
}
}
- branch master updated: Fix afl-fuzz error,
Gavin D. Smith <=