~ubuntu-branches/ubuntu/trusty/rhash/trusty

« back to all changes in this revision

Viewing changes to debian/patches/rhash-1.2.7-mem-fix.patch

  • Committer: Bazaar Package Importer
  • Author(s): Aleksey Kravchenko
  • Date: 2011-08-14 20:35:00 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110814203500-rvnovipwcpqkm91u
Tags: 1.2.7-1
* New upstream release version 1.2.7
 - Fixes security issue (Closes: #632280)
 - changed author/mantainer name to the way I prefer s/Alexey S/Aleksey/
 - simplified desriptions of binary packages
 - wriiten rules in more now standard way, using CFLAGS/LDFLAGS
 - reworded README.Debian a bit
 - aplied patch from upstream to fix possible segfault
 - aplied patch from upstream to fix glibc runtime warning
 - aplied patch from upstream to repair -openssl option handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: fix buffer overflow when using --embed-crc-delimiter
 
2
 The patch from upstream GIT, fixes a glibc memory warning, reported on
 
3
 some systems while building rhash, on the 'make test' step.
 
4
 
 
5
Origin: upstream https://github.com/rhash/RHash/commit/c8c6cc870dbe51a507b98b9cc5925179400b3ff7
 
6
Author: Aleksey Kravchenko <rhash.admin@gmail.com>
 
7
Bug-RHash: https://sourceforge.net/tracker/?func=detail&aid=3391587&group_id=205103&atid=992288
 
8
Forwarded: sent-to-upstream
 
9
Last-Update: 2011-08-23
 
10
 
 
11
 
 
12
diff -Nur rhash-1.2.7.orig/calc_sums.c rhash-1.2.7.new/calc_sums.c
 
13
--- rhash-1.2.7.orig/calc_sums.c        2011-08-08 12:03:06.000000000 +0700
 
14
+++ rhash-1.2.7.new/calc_sums.c 2011-08-20 14:24:45.213842707 +0700
 
15
@@ -241,8 +241,8 @@
 
16
                }
 
17
        }
 
18
 
 
19
-       /* now p is the point to insert the 10-bytes hash string */
 
20
-       new_path = (char*)rsh_malloc(len + 11);
 
21
+       /* now p is the point to insert delimiter + hash string in brackets */
 
22
+       new_path = (char*)rsh_malloc(len + 12);
 
23
        insertion_point = new_path + (p - info->full_path);
 
24
        memcpy(new_path, info->full_path, p - info->full_path);
 
25
        if(opt.embed_crc_delimiter && *opt.embed_crc_delimiter) *(insertion_point++) = *opt.embed_crc_delimiter;