intel/measure: increase size of filename malloc to account for \0

Corrects regression caused by prior commit that created memory
overwrite by not mallocing enough space for filename string.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32013>
This commit is contained in:
Felix DeGrood
2024-11-06 19:28:09 +00:00
committed by Marge Bot
parent 918978f525
commit bf96702985

View File

@@ -116,8 +116,7 @@ intel_measure_init(struct intel_measure_device *device)
if (filename && __normal_user()) {
filename += 5;
config.deferred_create_filename = malloc(strlen(filename));
strcpy(config.deferred_create_filename, filename);
config.deferred_create_filename = strdup(filename);
}
if (start_frame_s) {