]> git.pld-linux.org Git - packages/recode.git/blob - recode-debian-11.patch
7a584aab45b334b3ed2508ae97cc6a08c46ac30f
[packages/recode.git] / recode-debian-11.patch
1 Ripped from Debian patchset 3.6-11
2
3 --- recode-3.6.orig/src/libiconv.c
4 +++ recode-3.6/src/libiconv.c
5 @@ -195,12 +195,17 @@
6          memcpy() doesn't do here, because the regions might overlap.
7          memmove() isn't worth it, because we rarely have to move more
8          than 12 bytes.  */
9 -      if (input > input_buffer && input_left > 0)
10 +      cursor = input_buffer;
11 +      if (input_left > 0)
12         {
13 -         cursor = input_buffer;
14 -         do
15 -           *cursor++ = *input++;
16 -         while (--input_left > 0);
17 +         if (input > input_buffer)
18 +           {
19 +             do
20 +               *cursor++ = *input++;
21 +             while (--input_left > 0);
22 +           }
23 +         else
24 +           cursor += input_left;
25         }
26      }
27  
28 --- recode-3.6.orig/src/request.c
29 +++ recode-3.6/src/request.c
30 @@ -1073,7 +1073,7 @@
31    if (task->output.cursor + 4 >= task->output.limit)
32      {
33        RECODE_OUTER outer = task->request->outer;
34 -      size_t old_size = task->output.limit - task->output.buffer;
35 +      size_t old_size = task->output.cursor - task->output.buffer;
36        size_t new_size = task->output.cursor + 4 - task->output.buffer;
37  
38        /* FIXME: Rethink about how the error should be reported.  */
39 --- recode-3.6.orig/src/task.c
40 +++ recode-3.6/src/task.c
41 @@ -1198,6 +1198,8 @@
42        else
43         success = transform_mere_copy (subtask);
44  
45 +      task->output = subtask->output;
46 +       
47        if (subtask->input.name && *subtask->input.name)
48         fclose (subtask->input.file);
49        if (subtask->output.name && *subtask->output.name)
This page took 0.031327 seconds and 2 git commands to generate.