----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9088/#review15703 -----------------------------------------------------------
http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/codec/codec.c <https://reviews.apache.org/r/9088/#comment33853> I'd just use malloc and PN_ENSURE rather than truncate - this isn't a performance critical path. http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/codec/codec.c <https://reviews.apache.org/r/9088/#comment33852> Why not malloc & use PN_ENSURE in the loop, rather than truncate? http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/messenger.c <https://reviews.apache.org/r/9088/#comment33856> I don't think there is a maximum defined limit to addresses (yet), but there should be. For now it'd be better to #define a Very Large Value and use that consistently. Also log an error on overflow so we know if we ever hit it. http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/messenger.c <https://reviews.apache.org/r/9088/#comment33858> ditto http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/messenger.c <https://reviews.apache.org/r/9088/#comment33859> ditto http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/messenger.c <https://reviews.apache.org/r/9088/#comment33855> Might be simplier/faster to just keep a pointer to a "munge buffer" and length in the messenger structure and use PN_ENSURE here to make sure it's big enough. http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/util.c <https://reviews.apache.org/r/9088/#comment33854> I'd just use malloc and PN_ENSURE rather than truncate - this isn't a performance critical path. - Kenneth Giusti On Jan. 24, 2013, 8:49 a.m., Cliff Jansen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/9088/ > ----------------------------------------------------------- > > (Updated Jan. 24, 2013, 8:49 a.m.) > > > Review request for qpid, Andrew Stitcher, Kenneth Giusti, Rafael Schloming, > and Mary Hinton. > > > Description > ------- > > gcc flag "-Wvla" that checks for variable length array usage > > > This addresses bugs proton-159 and proton-57. > https://issues.apache.org/jira/browse/proton-159 > https://issues.apache.org/jira/browse/proton-57 > > > Diffs > ----- > > http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/CMakeLists.txt > 1435762 > > http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/examples/messenger/c/recv.c > 1435762 > > http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/codec/codec.c > 1435762 > > http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/engine/engine.c > 1435762 > http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/messenger.c > 1435762 > http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/proton.c > 1435762 > http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/sasl/sasl.c > 1435762 > http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/util.c > 1435762 > > Diff: https://reviews.apache.org/r/9088/diff/ > > > Testing > ------- > > compiles on linux and runs proton test. Along with other patches, also > compiles in Visual Studio. > > > Thanks, > > Cliff Jansen > >
