We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentb9e9775 commit9563afaCopy full SHA for 9563afa
src/backend/libpq/ip.c
@@ -8,7 +8,7 @@
8
*
9
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.44 2009/01/2319:58:06 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.45 2009/04/2323:25:13 tgl Exp $
12
13
* This file and the IPV6 implementation were initially provided by
14
* Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
@@ -394,6 +394,7 @@ pg_sockaddr_cidr_mask(struct sockaddr_storage * mask, char *numbits, int family)
394
395
if (bits<0||bits>32)
396
return-1;
397
+memset(&mask4,0,sizeof(mask4));
398
/* avoid "x << 32", which is not portable */
399
if (bits>0)
400
maskl= (0xffffffffUL << (32- (int)bits))
@@ -413,6 +414,7 @@ pg_sockaddr_cidr_mask(struct sockaddr_storage * mask, char *numbits, int family)
413
414
415
if (bits<0||bits>128)
416
417
+memset(&mask6,0,sizeof(mask6));
418
for (i=0;i<16;i++)
419
{
420
if (bits <=0)