satyenr / protobuf-perlxs

Automatically exported from code.google.com/p/protobuf-perlxs
Apache License 2.0
0 stars 0 forks source link

Off-by-one error in XS generated code for initializing repeated elements in ->new() #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
After doing some experimentation I found an issue trying to initialize
repeated elements when passing a HASHREF to ->new() for a protoxs generated
class.  I was able to track it down to an off-by-one condition in the for()
loop that initializes the repeated item in the from_hashref() helper.  I've
attached a patch that solves the problem on my end.

Original issue reported on code.google.com by jason.h...@gmail.com on 15 Jan 2009 at 12:55

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks Jason!  I'll put this fix into 0.6, which should be ready over the 
weekend.

-dave

Original comment by dba...@gmail.com on 16 Jan 2009 at 8:49

GoogleCodeExporter commented 9 years ago
Any chance 0.6 is getting released shortly?  I was going to wait for 0.6 
because of
this bug, but I'll apply the patch manually if 0.6 is getting delayed.

Thanks,
-- Darien

Original comment by dkindl...@gmail.com on 21 Jan 2009 at 6:33

GoogleCodeExporter commented 9 years ago
Hi Darien,

I just uploaded protobuf-perlxs 0.6 to the downloads area.  

-dave

Original comment by dave%dav...@gtempaccount.com on 21 Jan 2009 at 9:19