summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/reply.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 96595223a6..01d4332b7e 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -456,7 +456,9 @@ static bool netbios_session_retarget(struct smbd_server_connection *sconn,
p = strchr_m(retarget, '#');
if (p != NULL) {
*p++ = '\0';
- sscanf(p, "%x", &retarget_type);
+ if (sscanf(p, "%x", &retarget_type) != 1) {
+ goto fail;
+ }
}
ret = resolve_name(retarget, &retarget_addr, retarget_type, false);