Fix off-by-one error in generating the so_info file 08/185008/2
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Wed, 25 Jul 2018 07:18:00 +0000 (09:18 +0200)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Thu, 26 Jul 2018 09:44:24 +0000 (11:44 +0200)
Change-Id: I65dba1b2be1237578df5679586f1449d4fa94023

src/crash-manager/so-info.c

index 53ad1fe..07032b5 100644 (file)
@@ -254,7 +254,7 @@ char* get_rpm_info_as_string(Header h)
                _E("Failed to allocate memory: %m");
                return NULL;
        }
-       snprintf(res, info_len, "%s;%s;%s;%s", name, version, release, arch);
+       snprintf(res, info_len + 1, "%s;%s;%s;%s", name, version, release, arch);
 
        return res;
 }