[Pkg-samba-maint] [samba] 100/135: s3-libsmb: Fix scanf format in parse_ace().

Ivo De Decker ivodd at moszumanska.debian.org
Sat Jan 11 21:30:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

ivodd pushed a commit to branch master
in repository samba.

commit 8c059c05ed9d606cd2c919e5149c6ad68a72955e
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Nov 15 17:02:16 2013 +0100

    s3-libsmb: Fix scanf format in parse_ace().
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 1214e3345c655a4c7dc98c69c4e018e47558f639)
---
 source3/libsmb/libsmb_xattr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index 22ffa8f..7d34290 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -303,7 +303,7 @@ parse_ace(struct cli_state *ipc_cli,
 	p++;
 	/* Try to parse numeric form */
 
-	if (sscanf(p, "%i/%i/%i", &atype, &aflags, &amask) == 3 &&
+	if (sscanf(p, "%u/%u/%u", &atype, &aflags, &amask) == 3 &&
 	    convert_string_to_sid(ipc_cli, pol, numeric, &sid, str)) {
 		goto done;
 	}
@@ -333,7 +333,7 @@ parse_ace(struct cli_state *ipc_cli,
 	/* Only numeric form accepted for flags at present */
 
 	if (!(next_token_talloc(frame, &cp, &tok, "/") &&
-	      sscanf(tok, "%i", &aflags))) {
+	      sscanf(tok, "%u", &aflags))) {
 		TALLOC_FREE(frame);
 		return false;
 	}
@@ -344,7 +344,7 @@ parse_ace(struct cli_state *ipc_cli,
 	}
 
 	if (strncmp(tok, "0x", 2) == 0) {
-		if (sscanf(tok, "%i", &amask) != 1) {
+		if (sscanf(tok, "%u", &amask) != 1) {
 			TALLOC_FREE(frame);
 			return false;
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list