]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR31314, chew crashing on use of uninitialized value
authorAlan Modra <amodra@gmail.com>
Mon, 29 Jan 2024 23:08:56 +0000 (09:38 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 29 Jan 2024 23:12:59 +0000 (09:42 +1030)
The "drop" call in wrap_comment already increments pc.  Defining DOCDD
in proto.str is a warning fix.

PR 31314
* chew.c (wrap_comment): Don't increment pc.
* proto.str (DOCDD): Define.

bfd/doc/chew.c
bfd/doc/proto.str

index 28c8072c27259492fbe726d6a05dbf37628b0c20..842d4153005ec4d26c78ba49a562db163fb73efb 100644 (file)
@@ -541,8 +541,6 @@ wrap_comment (void)
 
   overwrite_string (tos - 1, &out);
   drop ();
-
-  pc++;
 }
 
 /* Mod tos so that only lines with leading dots remain */
index ee06c31fa7cdbe99561b887fdd06f937c25191dc..9a56397d719eb6d199caf81e14a9308a1bd3201c 100644 (file)
 : SUBSUBSECTION ignore ;
 : INODE ignore ;
 : DESCRIPTION ignore ;
+: DOCDD ignore ;
 : ENDDD EXTERNAL ;
 : FUNCTION EXTERNAL ;
 : INTERNAL_FUNCTION INTERNAL ;