~ubuntu-branches/ubuntu/karmic/postgresql-8.4/karmic-security

« back to all changes in this revision

Viewing changes to src/backend/libpq/ip.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-05-05 00:58:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505005806-c19tt7oyqb7kuw49
Tags: 8.4~beta1+cvs20090503-1
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
394
394
 
395
395
                                if (bits < 0 || bits > 32)
396
396
                                        return -1;
 
397
                                memset(&mask4, 0, sizeof(mask4));
397
398
                                /* avoid "x << 32", which is not portable */
398
399
                                if (bits > 0)
399
400
                                        maskl = (0xffffffffUL << (32 - (int) bits))
413
414
 
414
415
                                if (bits < 0 || bits > 128)
415
416
                                        return -1;
 
417
                                memset(&mask6, 0, sizeof(mask6));
416
418
                                for (i = 0; i < 16; i++)
417
419
                                {
418
420
                                        if (bits <= 0)