EasyCwmp - easycwmp
View Issue Details
0000332easycwmp[All Projects] Bugpublic2018-06-08 08:042018-06-08 18:22
tomgrean 
mohamed.kallel 
normalminoralways
resolvedfixed 
anyanyany
0000332: array out of index in src/time.c
in 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.
I 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.
No tags attached.
duplicate of 0000309resolved mohamed.kallel in module time.c the array for local_time is too short! It MUST be char local_time[27] = {0} 
Issue History
2018-06-08 08:04tomgreanNew Issue
2018-06-08 18:00mohamed.kallelRelationship addedrelated to 0000309
2018-06-08 18:22mohamed.kallelNote Added: 0000871
2018-06-08 18:22mohamed.kallelRelationship replacedduplicate of 0000309
2018-06-08 18:22mohamed.kallelStatusnew => resolved
2018-06-08 18:22mohamed.kallelResolutionopen => fixed
2018-06-08 18:22mohamed.kallelAssigned To => mohamed.kallel

Notes
(0000871)
mohamed.kallel   
2018-06-08 18:22   
delivered in EasyCwmp-1.6.2