aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2025-07-05 19:02:24 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2025-07-05 19:11:15 -0700
commit87f5e2edca1412326ae40489e2780821093481cb (patch)
tree074e86e335ba44c901bc2396f24b9a789d7b58d5
parentc8d7be63fa3a8d6e80cf199e7faf40e2c5e25c6f (diff)
downloadbinutils-87f5e2edca1412326ae40489e2780821093481cb.zip
binutils-87f5e2edca1412326ae40489e2780821093481cb.tar.gz
binutils-87f5e2edca1412326ae40489e2780821093481cb.tar.bz2
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.
-rw-r--r--libsframe/sframe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsframe/sframe.c b/libsframe/sframe.c
index d38a61d..2894009 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);