search for: make_hash_nam

Displaying 6 results from an estimated 6 matches for "make_hash_nam".

Did you mean: make_hash_name
2011 Dec 12
11
[Bug 8654] New: link-by-hash: Fix (non-exploitable) buffer overflow
...version of the hash but it needs two: one for the '/' directory separator and another for the trailing null. This was caught by noticing a compile warning: gcc -std=gnu99 -I. -I../rsync -g -O2 -DHAVE_CONFIG_H -Wall -W -c ../rsync/hashlink.c -o hashlink.o ../rsync/hashlink.c: In function ?make_hash_name?: ../rsync/hashlink.c:46: warning: array subscript is above array bounds The overflow is non-exploitable as it harmlessly overwrites the following dst variable with a null just before using asprintf() to set the dst variable again. But it should be fixed - see attached patch, against "packa...
2004 Feb 09
1
[patch] Add `--link-by-hash' option.
...icense + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* This file contains code used by the --link-by-hash option. */ + +#include "rsync.h" + +extern char *link_by_hash_dir; + +#ifdef HAVE_LINK + +char* make_hash_name(struct file_struct *file) +{ + char hash[33], *dst; + unsigned char *src; + unsigned char c; + int i; + + src = (unsigned char*)file->sum; + for (dst = hash, i = 0; i < 4; i++, src++) { + c = *src >> 4; + *(dst++) = (c >= 10) ? (c - 10 + 'a') : (c + '0'); + c = *s...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...icense + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* This file contains code used by the --link-by-hash option. */ + +#include "rsync.h" + +extern char *link_by_hash_dir; + +#ifdef HAVE_LINK + +char* make_hash_name(struct file_struct *file) +{ + char hash[33], *dst; + unsigned char *src; + unsigned char c; + int i; + + src = (unsigned char*)file->u.sum; + for (dst = hash, i = 0; i < 4; i++, src++) { + c = *src >> 4; + *(dst++) = (c >= 10) ? (c - 10 + 'a') : (c + '0'); + c =...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
...icense + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* This file contains code used by the --link-by-hash option. */ + +#include "rsync.h" + +extern char *link_by_hash_dir; + +#ifdef HAVE_LINK + +char* make_hash_name(struct file_struct *file) +{ + char hash[33], *dst; + unsigned char *src; + unsigned char c; + int i; + + src = (unsigned char*)file->u.sum; + for (dst = hash, i = 0; i < 4; i++, src++) { + c = *src >> 4; + *(dst++) = (c >= 10) ? (c - 10 + 'a') : (c + '0'); + c =...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...icense + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* This file contains code used by the --link-by-hash option. */ + +#include "rsync.h" + +extern char *link_by_hash_dir; + +#ifdef HAVE_LINK + +char* make_hash_name(struct file_struct *file) +{ + char hash[33], *dst; + unsigned char *src; + unsigned char c; + int i; + + src = (unsigned char*)file->u.sum; + for (dst = hash, i = 0; i < 4; i++, src++) { + c = *src >> 4; + *(dst++) = (c >= 10) ? (c - 10 + 'a') : (c + '0'); + c =...
2004 Feb 16
1
[patch] Add `--link-by-hash' option (rev 2).
...icense + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* This file contains code used by the --link-by-hash option. */ + +#include "rsync.h" + +extern char *link_by_hash_dir; + +#ifdef HAVE_LINK + +char* make_hash_name(struct file_struct *file) +{ + char hash[33], *dst; + unsigned char *src; + unsigned char c; + int i; + + src = (unsigned char*)file->u.sum; + for (dst = hash, i = 0; i < 4; i++, src++) { + c = *src >> 4; + *(dst++) = (c >= 10) ? (c - 10 + 'a') : (c + '0'); + c =...