File: 05-src-request-c-pointer-recalculation.patch

package info (click to toggle)
recode 3.6-24
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 11,700 kB
  • sloc: ansic: 89,467; sh: 16,490; python: 1,281; lisp: 1,027; perl: 335; makefile: 309; lex: 171
file content (16 lines) | stat: -rw-r--r-- 582 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
From: Enrik Berkhan
Subject: Fixes wrong pointer recalculation
Bug-Debian: https://bugs.debian.org/156635
X-Debian-version: 3.6-7

--- a/src/request.c
+++ b/src/request.c
@@ -1073,7 +1073,7 @@
   if (task->output.cursor + 4 >= task->output.limit)
     {
       RECODE_OUTER outer = task->request->outer;
-      size_t old_size = task->output.limit - task->output.buffer;
+      size_t old_size = task->output.cursor - task->output.buffer;
       size_t new_size = task->output.cursor + 4 - task->output.buffer;
 
       /* FIXME: Rethink about how the error should be reported.  */