File: 02-fix-an-out-of-buffer-read.patch

package info (click to toggle)
indent 2.2.13-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,696 kB
  • sloc: ansic: 20,903; sh: 5,035; makefile: 165; sed: 16; cpp: 5
file content (17 lines) | stat: -rw-r--r-- 541 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
From: Petr Písař <ppisar@redhat.com>
Subject: Fix an out-of-buffer read in search_brace()/lexi()
Bug-Debian: https://bugs.debian.org/1049366
Forwarded: https://savannah.gnu.org/bugs/index.php?64503

--- a/src/indent.c
+++ b/src/indent.c
@@ -145,8 +145,8 @@
     parser_state_tos->search_brace = false;
     bp_save = buf_ptr;
     be_save = buf_end;
-    buf_ptr = save_com.ptr;
     need_chars (&save_com, 1);
+    buf_ptr = save_com.ptr;
     buf_end = save_com.end;
     save_com.end = save_com.ptr;        /* make save_com empty */
 }