splone / splonebox-core

splonebox - open source network assessment tool with focus on modularity
http://splonebox.io
GNU Affero General Public License v3.0
24 stars 7 forks source link

Missing initialization for api_error in dispatch-handle-run and dispatch-handle-register #27

Closed bontric closed 8 years ago

bontric commented 8 years ago

The bool isset in api_error has to be initialized before usage. This is missing in dispatch-handle-run and dispatch-handle-register

// dispatch-handle-register.c:59
struct api_error *err = MALLOC(struct api_error);

// dispatch-handle-register:72
info.api_error = *err;
assert_non_null(err);

// dispatch-handle-register:139
assert_false(info.api_error.isset); // might fail 
// dispatch-handle-run.c:228
struct api_error *err = MALLOC(struct api_error);

// dispatch-handle-run:236
info.api_error = *err;
assert_non_null(err);

// dispatch-handle-run:272
assert_false(info.api_error.isset); // might fail 
stze commented 8 years ago

fixed in 59bd266 in #22