fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/28424 )
Change subject: db_auc: hexparse_stmt(): check value returned by osmo_hexparse() ......................................................................
db_auc: hexparse_stmt(): check value returned by osmo_hexparse()
Change-Id: I78bb3aff9dd57a38278bb34113ea764e0a54c439 Fixes: CID#272997 --- M src/db_auc.c 1 file changed, 4 insertions(+), 1 deletion(-)
Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/src/db_auc.c b/src/db_auc.c index 975eb2d..11f282b 100644 --- a/src/db_auc.c +++ b/src/db_auc.c @@ -95,7 +95,10 @@ LOGAUC(imsi, LOGL_ERROR, "Error reading %s\n", col_name); return -EIO; } - osmo_hexparse((void *)text, dst, dst_len); + + if (osmo_hexparse((void *)text, dst, dst_len) != col_len) + return -EINVAL; + return 0; }