X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Faddagent%2Fread_from_user.c;h=c46d1588413dd9157144fb4de7d20e2b94f92270;hp=13ccca59a4c59c8d9ad1383c536e3523f720877b;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hpb=301048b51990573e58a30dc4a5bb4ec285cad554 diff --git a/src/addagent/read_from_user.c b/src/addagent/read_from_user.c index 13ccca5..c46d158 100755 --- a/src/addagent/read_from_user.c +++ b/src/addagent/read_from_user.c @@ -1,4 +1,5 @@ -/* @(#) $Id$ */ +/* @(#) $Id: ./src/addagent/read_from_user.c, 2011/09/08 dcid Exp $ + */ /* Copyright (C) 2009 Trend Micro Inc. * All rights reserved. @@ -22,7 +23,7 @@ char *read_from_user() { memset(__user_buffer, '\0', USER_SIZE +1); - if((fgets(__user_buffer, USER_SIZE -1, stdin) == NULL) || + if((fgets(__user_buffer, USER_SIZE -1, stdin) == NULL) || (strlen(__user_buffer) >= (USER_SIZE -2))) { printf(INPUT_LARGE);