From: Francis Deslauriers Date: Tue, 30 Apr 2019 17:51:03 +0000 (-0400) Subject: Fix: src.ctf.fs: metadata-info: sanitize `path` param X-Git-Tag: v2.0.0-pre5~32 X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=43eacc5292f04dc434140eca7fee78f2257666c3;hp=43eacc5292f04dc434140eca7fee78f2257666c3;p=babeltrace.git Fix: src.ctf.fs: metadata-info: sanitize `path` param Issue ===== Omitting to pass the mandatory `path` parameter to the `metadata-info` query results in a BT_ASSERT() failure when calling bt_value_get_string(), or a NULL pointer dereference in non-DEV_MODE. Similarly, setting the `path` to a non-string value would also result in a BT_ASSERT() failure, or a invalid memory access in non-DEV_MODE Solution ======== Confirm that the `path` parameter is present and is of the string type and print error messages accordingly it's not. Known drawbacks =============== None. Signed-off-by: Francis Deslauriers Change-Id: I8182de2797c375262d77a4a8961bedb4c5ef9578 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1081 Reviewed-by: Philippe Proulx ---