projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
501b255
)
* check the username for length so we don't smash our stack.
author
Wilfried Göesgens
<willi@citadel.org>
Wed, 3 Oct 2007 13:24:47 +0000
(13:24 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Wed, 3 Oct 2007 13:24:47 +0000
(13:24 +0000)
citadel/user_ops.c
patch
|
blob
|
history
diff --git
a/citadel/user_ops.c
b/citadel/user_ops.c
index 68ea605695b01c43fa51778611ff64099f525da6..20aa372d234894c89350c93086808e749a05293f 100644
(file)
--- a/
citadel/user_ops.c
+++ b/
citadel/user_ops.c
@@
-62,6
+62,13
@@
static INLINE void makeuserkey(char *key, char *username) {
int i, len;
len = strlen(username);
+ if (len >= USERNAME_SIZE)
+ {
+ lprintf (CTDL_EMERG, "Username to long: %s", username);
+ cit_backtrace ();
+ len = USERNAME_SIZE - 1;
+ username[USERNAME_SIZE - 1]='\0';
+ }
for (i=0; i<=len; ++i) {
key[i] = tolower(username[i]);
}