Skip to content

Commit

Permalink
accel/habanalabs: increase HL_MAX_STR to 64 bytes to avoid warnings
Browse files Browse the repository at this point in the history
[ Upstream commit 8c07540 ]

Fix a warning of a buffer overflow:
‘snprintf’ output between 38 and 47 bytes into a destination of size 32

Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
KobyElbaz authored and gregkh committed Apr 13, 2024
1 parent 953fee8 commit cd0a183
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/accel/habanalabs/common/habanalabs.h
Expand Up @@ -2508,7 +2508,7 @@ struct hl_state_dump_specs {
* DEVICES
*/

#define HL_STR_MAX 32
#define HL_STR_MAX 64

#define HL_DEV_STS_MAX (HL_DEVICE_STATUS_LAST + 1)

Expand Down

0 comments on commit cd0a183

Please sign in to comment.