[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r5326 - branches/OpenDNSSEC-1.2/signer/src

Matthijs Mekking matthijs at nlnetlabs.nl
Wed Jul 13 15:57:56 CEST 2011


Author: matthijs
Date: 2011-07-13 15:57:56 +0200 (Wed, 13 Jul 2011)
New Revision: 5326

Modified:
   branches/OpenDNSSEC-1.2/signer/src/ods-signer.c
   branches/OpenDNSSEC-1.2/signer/src/ods-signerd.c
Log:
backport from 1.3 (#2)



Modified: branches/OpenDNSSEC-1.2/signer/src/ods-signer.c
===================================================================
--- branches/OpenDNSSEC-1.2/signer/src/ods-signer.c	2011-07-13 13:57:30 UTC (rev 5325)
+++ branches/OpenDNSSEC-1.2/signer/src/ods-signer.c	2011-07-13 13:57:56 UTC (rev 5326)
@@ -242,6 +242,8 @@
                 FD_CLR(fileno(fp), &rset);
                 continue;
             }
+
+            buf[ODS_SE_MAXLINE-1] = '\0';
             if (strncmp(buf, "exit", 4) == 0 ||
                 strncmp(buf, "quit", 4) == 0) {
                 return;
@@ -370,6 +372,10 @@
     }
     if (argc > 1) {
         cmd = (char*) se_calloc(options_size+2,sizeof(char));
+        if (!cmd) {
+            fprintf(stderr, "memory allocation failed\n");
+            exit(1);
+        }
         (void)strncpy(cmd, "", 1);
         for (c = 1; c < argc; c++) {
             (void)strncat(cmd, options[c], strlen(options[c]));

Modified: branches/OpenDNSSEC-1.2/signer/src/ods-signerd.c
===================================================================
--- branches/OpenDNSSEC-1.2/signer/src/ods-signerd.c	2011-07-13 13:57:30 UTC (rev 5325)
+++ branches/OpenDNSSEC-1.2/signer/src/ods-signerd.c	2011-07-13 13:57:56 UTC (rev 5326)
@@ -157,7 +157,6 @@
     }
 #endif /* ENFORCER_TIMESHIFT */
 
-
     /* main stuff */
     fprintf(stdout, "OpenDNSSEC signer engine version %s\n", PACKAGE_VERSION);
     engine_start(cfgfile, cmdline_verbosity, daemonize, info, single_run);




More information about the Opendnssec-commits mailing list