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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user