File pacemaker-libcrmcommon-add-a-byte-to-pid-file-holder.patch of Package pacemaker.19778

commit f6e5b216e0a8572c6e033fe31fbb7cadf99860da
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Fri Apr 6 19:12:16 2018 -0500

    Refactor: libcrmcommon: add a byte to pid file holder
    
    In practice, pid files won't be negative, but static analyzers don't know that.
    Add a byte to hold the minus sign.

diff --git a/lib/common/utils.c b/lib/common/utils.c
index 14053f952..582838e46 100644
--- a/lib/common/utils.c
+++ b/lib/common/utils.c
@@ -813,7 +813,7 @@ crm_lock_pidfile(const char *filename, const char *name)
 {
     long mypid = 0;
     int fd = 0, rc = 0;
-    char buf[LOCKSTRLEN + 1];
+    char buf[LOCKSTRLEN + 2];
 
     mypid = (unsigned long)getpid();
 
openSUSE Build Service is sponsored by