[binutils-gdb] libsframe: fix error code in sframe_decode
Indu Bhagat
ibhagat@sourceware.org
Sun Jul 6 02:11:42 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=87f5e2edca1412326ae40489e2780821093481cb
commit 87f5e2edca1412326ae40489e2780821093481cb
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date: Sat Jul 5 19:02:24 2025 -0700
libsframe: fix error code in sframe_decode
When sanity check of SFrame header fails, set error code to
SFRAME_ERR_BUF_INVAL instead of the current SFRAME_ERR_NOMEM.
Diff:
---
libsframe/sframe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libsframe/sframe.c b/libsframe/sframe.c
index d38a61dbd63..2894009260d 100644
--- a/libsframe/sframe.c
+++ b/libsframe/sframe.c
@@ -913,7 +913,7 @@ sframe_decode (const char *sf_buf, size_t sf_size, int *errp)
sfheaderp = &dctx->sfd_header;
if (!sframe_header_sanity_check_p (sfheaderp))
{
- sframe_ret_set_errno (errp, SFRAME_ERR_NOMEM);
+ sframe_ret_set_errno (errp, SFRAME_ERR_BUF_INVAL);
goto decode_fail_free;
}
hdrsz = sframe_get_hdr_size (sfheaderp);
More information about the Binutils-cvs
mailing list