~ubuntu-branches/ubuntu/precise/ipsec-tools/precise-security

« back to all changes in this revision

Viewing changes to src/setkey/setkey.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-05-05 02:26:50 UTC
  • mfrom: (1.1.10 upstream) (3.1.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100505022650-z3tsr2uxt3npckr1
Tags: 1:0.7.3-6ubuntu1
* Merge from debian unstable.  Remaining changes:
  + debian/control:
    - Set Ubuntu maintainer address
    - Depend on lsb-base
  + debian/ipsec-tools.setket.init: LSB init script.
  + debian/{control,rules}: add and enable hardening build for PIE
    (Debian bug 542731)
  + src/racoon/ipsec_doi.c: Patched to fix segfault when using
    ipv6 addresses in sainfo section of racoon.conf. Thanks to 
    Fredrik Ljunggren. (LP: #374185)
  + src/racoon/isakmp.c: Fix address already in use. (LP: #332606)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*      $NetBSD: setkey.c,v 1.11.6.1 2007/08/01 11:52:23 vanhu Exp $    */
 
1
/*      $NetBSD: setkey.c,v 1.11.6.2 2009/08/06 04:45:16 tteras Exp $   */
2
2
 
3
3
/*      $KAME: setkey.c,v 1.36 2003/09/24 23:52:51 itojun Exp $ */
4
4
 
314
314
#else
315
315
                char rbuf[1024];
316
316
                rbuf[0] = '\0';
317
 
                if (!fgets (rbuf, sizeof(rbuf), stdin)) 
318
 
                        break;
319
 
                if (!rbuf[0])
 
317
                if (fgets(rbuf, sizeof(rbuf), stdin) == NULL)
320
318
                        break;
321
319
                if (rbuf[strlen(rbuf)-1] == '\n')
322
320
                        rbuf[strlen(rbuf)-1] = '\0';