diff options
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r-- | networking/udhcp/files.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c index 1b2cc96..40cfe9f 100644 --- a/networking/udhcp/files.c +++ b/networking/udhcp/files.c @@ -201,9 +201,8 @@ static int FAST_FUNC read_opt(const char *const_line, void *arg) #if ENABLE_FEATURE_UDHCP_RFC3397 case OPTION_STR1035: #endif - length = strlen(val); + length = strnlen(val, 254); if (length > 0) { - if (length > 254) length = 254; opt = val; retval = 1; } |