3
0
forked from pool/findutils
findutils/findutils-init_stat_buf.patch
Philipp Thomas 618f1228d5 - Initialize stat_buf in find.c(process_path) so that find by inum
works (bnc#780928 http://savannah.gnu.org/bugs/?37683)
  findutils-init_stat_buf.patch.
- Exclude /.snapshot from updatedb's indexing (bnc#780918)
  No patch, change was done in the sysconfig file of this package.
- Rename automake-1.12.patch to findutils-automake-1.12.patch

OBS-URL: https://build.opensuse.org/package/show/Base:System/findutils?expand=0&rev=36
2012-11-15 12:34:00 +00:00

29 lines
967 B
Diff

From: Philipp Thomas <pth@suse.de>
Date: 2012-11-13 11:58:38+01:00
Subject: Find by inode fails because of uninitialized structure
References: bnc#780928
Upstream: http://savannah.gnu.org/bugs/?37683
stat_buf in find.c(process_path) wasn't initialized and always contained the
inode no. of the first file. util.c(get_info) then thought it already
had the inode information and the following comparison in pred.c(pred_inum) in
fails of cause.
---
find/find.c | 1 +
1 file changed, 1 insertion(+)
Index: find/find.c
===================================================================
--- find/find.c.orig 2011-04-04 00:53:11.000000000 +0200
+++ find/find.c 2012-11-13 11:57:46.161844128 +0100
@@ -1131,6 +1131,7 @@ process_path (char *pathname, char *name
eval_tree = get_eval_tree ();
/* Assume it is a non-directory initially. */
+ memset(&stat_buf,'\0',sizeof(stat_buf));
stat_buf.st_mode = 0;
state.rel_pathname = name;
state.type = 0;