mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
tests: pad: fix invalid memory access in debug log message
The string we put in the buffer is not NUL-terminated, so don't try to print that via %s in a debug log message.
This commit is contained in:
parent
41946aa3f6
commit
0759058896
1 changed files with 3 additions and 1 deletions
|
@ -791,7 +791,9 @@ buffer_compare (GstBuffer * buf, const gchar * str, gsize size)
|
|||
|
||||
fail_unless (gst_buffer_map (buf, &info, GST_MAP_READ));
|
||||
res = memcmp (info.data, str, size) == 0;
|
||||
GST_DEBUG ("%s <-> %s: %d", (gchar *) info.data, str, res);
|
||||
GST_MEMDUMP ("buffer data", info.data, size);
|
||||
GST_MEMDUMP ("compare data", (guint8 *) str, size);
|
||||
GST_DEBUG ("buffers match: %s", res ? "yes" : "no");
|
||||
gst_buffer_unmap (buf, &info);
|
||||
|
||||
return res;
|
||||
|
|
Loading…
Reference in a new issue