]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: parser: The data won't be NULL-terminated
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Jun 2019 01:33:52 +0000 (02:33 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Jun 2019 01:33:52 +0000 (02:33 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/parser/grammar.y

index d139c5b4a69fc94800805bf729cd8d3983bd9738..633c4b703241fdd0730860d6ef931190f5ef28fc 100644 (file)
@@ -244,7 +244,8 @@ define                                              : T_DEFINE variable T_EOL
 int pakfire_parser_parse_data(PakfireParser parent, const char* data, size_t len) {
        Pakfire pakfire = pakfire_parser_get_pakfire(parent);
 
-       DEBUG(pakfire, "Parsing the following data:\n%s\n", data);
+       DEBUG(pakfire, "Parsing the following data (%zu):\n%.*s\n",
+               len, (int)len, data);
 
        // Save start time
        clock_t t_start = clock();