summaryrefslogtreecommitdiff
path: root/enscript-bufpos-crash.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-01 14:37:18 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-01 14:37:18 +0000
commit7236870216251a7f39821f92deace717dde87f32 (patch)
tree9ba49480f0dd3676f46efa3238daaba7aeb5ece0 /enscript-bufpos-crash.patch
parentc3b261f310fa46cc63aba9652581923232b91809 (diff)
automatic import of enscriptopeneuler24.03_LTSopeneuler23.09
Diffstat (limited to 'enscript-bufpos-crash.patch')
-rw-r--r--enscript-bufpos-crash.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/enscript-bufpos-crash.patch b/enscript-bufpos-crash.patch
new file mode 100644
index 0000000..60417ee
--- /dev/null
+++ b/enscript-bufpos-crash.patch
@@ -0,0 +1,12 @@
+diff -up enscript-1.6.5.2/src/psgen.c.bufpos-crash enscript-1.6.5.2/src/psgen.c
+--- enscript-1.6.5.2/src/psgen.c.bufpos-crash 2013-05-13 16:18:05.119393660 +0100
++++ enscript-1.6.5.2/src/psgen.c 2013-05-13 16:19:17.634739778 +0100
+@@ -1928,7 +1928,7 @@ get_next_token (InputStream *is, double
+ bufpos--;
+ }
+ /* Check the octal notations "\\%03o". */
+- else if (bufpos - 2 > w
++ else if (bufpos > 2 && bufpos - 2 > w
+ && ISOCTAL (buffer[bufpos])
+ && ISOCTAL (buffer[bufpos - 1])
+ && ISOCTAL (buffer[bufpos - 2])