git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bba7f28
)
s3:utils: explicitly check the return value of fscanf() to avoid unused warnings...
author
Stefan Metzmacher
<metze@samba.org>
Wed, 26 Feb 2014 19:16:26 +0000
(20:16 +0100)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 2 Apr 2014 07:03:43 +0000
(09:03 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/utils/smbta-util.c
patch
|
blob
|
history
diff --git
a/source3/utils/smbta-util.c
b/source3/utils/smbta-util.c
index 6dfa0d524bea50dfc0ae0ea5da0887a20cc393af..4c2accd1304d79c352a96b87e745a14eda8b3a04 100644
(file)
--- a/
source3/utils/smbta-util.c
+++ b/
source3/utils/smbta-util.c
@@
-78,7
+78,7
@@
static void load_key_from_file(char *filename, char *key)
exit(1);
}
l = fscanf(keyfile, "%s", key);
- if (strlen(key) != 16) {
+ if (
l != 1 ||
strlen(key) != 16) {
printf("Key file in wrong format\n");
fclose(keyfile);
exit(1);