View Issue Details

IDProjectCategoryView StatusLast Update
0000332easycwmpBugpublic2018-06-08 18:22
Reportertomgrean Assigned Tomohamed.kallel  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformanyOSanyOS Versionany
Summary0000332: array out of index in src/time.c
Descriptionin src/time.c, the declaration is:
char local_time[26] = {0};
but in the function, there is a line of this:
local_time[26] = '\0';
which is out of the array index.
Additional InformationI think the author miss-counted some of the array indexes.
actually the code should look like this:

local_time[24] = local_time[23];
local_time[23] = local_time[22];
local_time[22] = ':';
local_time[25] = '\0';

And one more thing, making variable local_time static is better.
TagsNo tags attached.
e-mail notification

Relationships

duplicate of 0000309 resolvedmohamed.kallel in module time.c the array for local_time is too short! It MUST be char local_time[27] = {0} 

Activities

mohamed.kallel

2018-06-08 18:22

administrator   ~0000871

delivered in EasyCwmp-1.6.2

Issue History

Date Modified Username Field Change
2018-06-08 08:04 tomgrean New Issue
2018-06-08 18:00 mohamed.kallel Relationship added related to 0000309
2018-06-08 18:22 mohamed.kallel Note Added: 0000871
2018-06-08 18:22 mohamed.kallel Relationship replaced duplicate of 0000309
2018-06-08 18:22 mohamed.kallel Status new => resolved
2018-06-08 18:22 mohamed.kallel Resolution open => fixed
2018-06-08 18:22 mohamed.kallel Assigned To => mohamed.kallel