Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl2/texinfo/dist/makeinfo Whilst debugging the nbm...



details:   https://anonhg.NetBSD.org/src/rev/3daa1c72b246
branches:  trunk
changeset: 983807:3daa1c72b246
user:      cjep <cjep%NetBSD.org@localhost>
date:      Mon Jun 07 20:27:59 2021 +0000

description:
Whilst debugging the nbmakeinfo tool on an OpenBSD box, I noticed
two changes in OpenBSD's makeinfo sources. One addresses an out of bounds
access issue and the other an off-by-one issue.

Fixes PR toolchain/56179. Reviewed by christos.

diffstat:

 external/gpl2/texinfo/dist/makeinfo/multi.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r d4c12f0dc8c2 -r 3daa1c72b246 external/gpl2/texinfo/dist/makeinfo/multi.c
--- a/external/gpl2/texinfo/dist/makeinfo/multi.c       Mon Jun 07 17:11:16 2021 +0000
+++ b/external/gpl2/texinfo/dist/makeinfo/multi.c       Mon Jun 07 20:27:59 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: multi.c,v 1.1.1.1 2016/01/14 00:11:29 christos Exp $   */
+/*     $NetBSD: multi.c,v 1.2 2021/06/07 20:27:59 cjep Exp $   */
 
 /* multi.c -- multiple-column tables (@multitable) for makeinfo.
    Id: multi.c,v 1.8 2004/04/11 17:56:47 karl Exp 
@@ -209,7 +209,7 @@
       params++;
 
     if (*params == '@') {
-      sscanf (params, "%200s", command);
+      sscanf (params, "%199s", command);
       nchars = strlen (command);
       params += nchars;
       if (strcmp (command, "@hsep") == 0)
@@ -432,8 +432,8 @@
 
   /* remove trailing whitespace from each column */
   for (i = 1; i <= last_column; i++) {
-    if (envs[i].output_paragraph_offset)
-      while (cr_or_whitespace (CHAR_AT (envs[i].output_paragraph_offset - 1)))
+    while (envs[i].output_paragraph_offset &&
+      cr_or_whitespace (CHAR_AT (envs[i].output_paragraph_offset - 1)))
         envs[i].output_paragraph_offset--;
 
     if (i == current_env_no)



Home | Main Index | Thread Index | Old Index