EasyCwmp

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000332easycwmp[All Projects] Bugpublic2018-06-08 08:042018-06-08 18:22
Reportertomgrean 
Assigned Tomohamed.kallel 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
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.
Attached Files

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

-  Notes
(0000871)
mohamed.kallel (manager)
2018-06-08 18:22

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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker