aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/driver.c b/driver.c
index 01014f96..6c22a49e 100644
--- a/driver.c
+++ b/driver.c
@@ -49,7 +49,7 @@
#include <krb.h>
#define krb_get_err_text(e) (krb_err_txt[e])
#else
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__linux__)
#define krb_get_err_text(e) (krb_err_txt[e])
#include <krb.h>
#include <des.h>
@@ -751,9 +751,11 @@ int num; /* index of message */
{
if( ctl->server.uidl )
{
- char id[IDLEN+1];
+ char id[IDLEN+1];
+ /* prevent stack overflows */
+ buf[IDLEN+12] = 0;
sscanf( buf+12, "%s", id);
- if( !str_in_list( &ctl->newsaved, id ) )
+ if( !str_find( &ctl->newsaved, num ) )
save_str(&ctl->newsaved, num, id );
}
}