[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7649] scan_node_contents strncmp instead of memcmp
From: |
gavinsmith0123 |
Subject: |
[7649] scan_node_contents strncmp instead of memcmp |
Date: |
Mon, 23 Jan 2017 15:48:49 -0500 (EST) |
Revision: 7649
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7649
Author: gavin
Date: 2017-01-23 15:48:49 -0500 (Mon, 23 Jan 2017)
Log Message:
-----------
scan_node_contents strncmp instead of memcmp
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/info-utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2017-01-23 20:31:40 UTC (rev 7648)
+++ trunk/ChangeLog 2017-01-23 20:48:49 UTC (rev 7649)
@@ -1,5 +1,13 @@
2017-01-23 Gavin Smith <address@hidden>
+ * info/info-utils.c (scan_node_contents): Use 'strncmp' instead
+ of 'memcmp' when checking for "* Menu:" string to avoid possibly
+ looking past the end of the file buffer, detected with
+ '-fsanitize=address' passed to gcc. Invalid read reported by
+ Hanno B\xF6ck.
+
+2017-01-23 Gavin Smith <address@hidden>
+
* info/info-utils.c (scan_reference_label): Properly check
return value of 'read_quoted_string' to avoid reading past the
end of the buffer. Invalid read reported by Hanno B\xF6ck.
Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c 2017-01-23 20:31:40 UTC (rev 7648)
+++ trunk/info/info-utils.c 2017-01-23 20:48:49 UTC (rev 7649)
@@ -1693,7 +1693,7 @@
add_pointer_to_array (entry, refs_index, refs, refs_slots, 50);
}
/* Was "* Menu:" seen? If so, search for menu entries hereafter. */
- else if (!in_menu && !memcmp (match, INFO_MENU_LABEL,
+ else if (!in_menu && !strncmp (match, INFO_MENU_LABEL,
strlen (INFO_MENU_LABEL)))
{
in_menu = 1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7649] scan_node_contents strncmp instead of memcmp,
gavinsmith0123 <=