diff -urN ntop-5.0.orig/httpd.c ntop-5.0/httpd.c --- ntop-5.0.orig/httpd.c 2012-07-18 01:14:33.000000000 +0200 +++ ntop-5.0/httpd.c 2012-07-20 12:15:57.306231889 +0200 @@ -3321,6 +3321,9 @@ strncpy(thePw, &outBuffer[i+1], thePwLen-1)[thePwLen-1] = '\0'; } + if(user == NULL) + user = ""; + if(strlen(user) >= sizeof(theHttpUser)) user[sizeof(theHttpUser)-1] = '\0'; strcpy(theHttpUser, user);