diff options
Diffstat (limited to 'source3/libsmb/namecache.c')
-rw-r--r-- | source3/libsmb/namecache.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/libsmb/namecache.c b/source3/libsmb/namecache.c index ec8a1900d87..afbd807198f 100644 --- a/source3/libsmb/namecache.c +++ b/source3/libsmb/namecache.c @@ -126,6 +126,10 @@ BOOL namecache_store(const char *name, int name_type, */ if (!gencache_init()) return False; + if (name_type > 255) { + return False; /* Don't store non-real name types. */ + } + if ( DEBUGLEVEL >= 5 ) { DEBUG(5, ("namecache_store: storing %d address%s for %s#%02x: ", num_names, num_names == 1 ? "": "es", name, name_type)); @@ -184,6 +188,10 @@ BOOL namecache_fetch(const char *name, int name_type, struct ip_service **ip_lis if (!gencache_init()) return False; + if (name_type > 255) { + return False; /* Don't fetch non-real name types. */ + } + *num_names = 0; /* |