jedisct1 / 6Jack

A framework for analyzing/testing/fuzzing network applications.
http://download.pureftpd.org/6jack/
Other
46 stars 7 forks source link

return_value should not be required #2

Open paraboul opened 12 years ago

paraboul commented 12 years ago

In a write or writev hook, a pre fitler must set the return_value in order to alter the original data. This should not be required.

filter_parse_common_reply_map() let rb->ret to 0 if no return_value is set in the pre filter. Do you think it's safe to remove the last condition from the following?

    if (obj_data != NULL && obj_data->type == MSGPACK_OBJECT_RAW &&
        *rb->ret > 0) {
jedisct1 commented 12 years ago

That totally makes sense, a return value shouldn't be required.