fix msm-plugin.c svace issue: make sure dupPath is not NULL before strchr()
[platform/upstream/rpm.git] / cliutils.c
index 5edecc5..772a105 100644 (file)
@@ -18,7 +18,7 @@ static pid_t pipeChild = 0;
 RPM_GNUC_NORETURN
 void argerror(const char * desc)
 {
-    fprintf(stderr, _("%s: %s\n"), __progname, desc);
+    fprintf(stderr, _("%s: %s\n"), xgetprogname(), desc);
     exit(EXIT_FAILURE);
 }
 
@@ -55,7 +55,6 @@ int initPipe(void)
     }
 
     if (!(pipeChild = fork())) {
-       (void) signal(SIGPIPE, SIG_DFL);
        (void) close(p[1]);
        (void) dup2(p[0], STDIN_FILENO);
        (void) close(p[0]);