Anonymous | Login | Signup for a new account | 2021-02-28 14:10 CET | ![]() |
My View | View Issues | Change Log | Roadmap | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000131 | easycwmp | [All Projects] Bug | public | 2016-05-02 23:12 | 2016-05-11 13:02 | ||||
Reporter | nriedel | ||||||||
Assigned To | mohamed.kallel | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Summary | 0000131: Incorrect use of comma operator in loops in xml.c | ||||||||
Description | My understanding of the comma operator is that it evaluates from left to right, and returns the last (right-most) result. In xml.c at around line 132 in the function xml_free_ns() we have: FREE(ns.cwmp); for (i = 0; i < ARRAY_SIZE(ns.soap_env), ns.soap_env[i]; i++) { FREE(ns.soap_env[i]); } The first conditional of the for loop end condition (i < ARRAY_SIZE(ns.soap_env)) has no effect. This is a problem if the ns.soap_env[] array is every full. I think the correct code is: FREE(ns.cwmp); for (i = 0; i < ARRAY_SIZE(ns.soap_env) && ns.soap_env[i]; i++) { FREE(ns.soap_env[i]); } The same problem occurs in xml_mxml_find_note_by_env_type() at line 196. | ||||||||
Steps To Reproduce | Code inspection. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
![]() |
|
(0000429) mohamed.kallel (manager) 2016-05-03 13:03 |
Yes, you are right This issue will be fixed in the next delivery inchallah |
(0000471) mohamed.kallel (manager) 2016-05-11 13:02 |
fixed in EasyCwmp-1.2.8 |
![]() |
|||
Date Modified | Username | Field | Change |
2016-05-02 23:12 | nriedel | New Issue | |
2016-05-03 13:03 | mohamed.kallel | Note Added: 0000429 | |
2016-05-11 13:02 | mohamed.kallel | Note Added: 0000471 | |
2016-05-11 13:02 | mohamed.kallel | Status | new => resolved |
2016-05-11 13:02 | mohamed.kallel | Resolution | open => fixed |
2016-05-11 13:02 | mohamed.kallel | Assigned To | => mohamed.kallel |
Copyright © 2000 - 2021 MantisBT Team |