File: 050-initialize_all_fields.patch

package info (click to toggle)
libnss-db 2.2.3pre1-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,272 kB
  • ctags: 575
  • sloc: sh: 6,885; ansic: 4,420; makefile: 471; yacc: 318
file content (13 lines) | stat: -rw-r--r-- 557 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
Initialize all of the fields of the key to zeroes, so that we don't pass
garbage keys in to later versions of Berkeley DB.

--- nss_db-2.2/src/db-XXX.c	2005-03-29 16:13:57.103516704 -0500
+++ nss_db-2.2/src/db-XXX.c	2005-03-29 16:13:47.108821931 -0500
@@ -225,6 +225,7 @@
   DBT key;								      \
   enum nss_status status;						      \
   const size_t size = (keysize) + 1;					      \
+  memset(&key, 0, sizeof(key));						      \
   key.data = alloca (size);						      \
   key.size = KEYPRINTF keypattern;					      \
   key.flags = 0;							      \