bugFreeciv - Bugs: bug #20494, Uninitialized PACKET_UNIT_ORDERS

 
 
Show feedback again

bug #20494: Uninitialized PACKET_UNIT_ORDERS

Submitted by:  pepeto <pepeto>
Submitted on:  Sun 10 Feb 2013 03:19:48 PM UTC  
 
Category: clientSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: pepeto <pepeto>Open/Closed: Closed
Release: S2_2, S2_3, S2_4, trunkOperating System: None
Planned Release: 2.3.5, 2.4.0, 2.5.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 21 Feb 2013 10:02:03 AM UTC, SVN revision 22412:

Initialize the packet_unit_orders structure in send_path_orders(). This was
the cause of read of uninitialized bytes and 8-bits overflow when sending the
packet.

See gna bug #20494

(Browse SVN revision 22412)

pepeto <pepeto>
Project MemberIn charge of this item.
Thu 21 Feb 2013 10:02:01 AM UTC, SVN revision 22411:

Initialize the packet_unit_orders structure in send_path_orders(). This was
the cause of read of uninitialized bytes and 8-bits overflow when sending the
packet.

See gna bug #20494

(Browse SVN revision 22411)

pepeto <pepeto>
Project MemberIn charge of this item.
Thu 21 Feb 2013 10:02:01 AM UTC, SVN revision 22410:

Initialize the packet_unit_orders structure in send_path_orders(). This was
the cause of read of uninitialized bytes and 8-bits overflow when sending the
packet.

See gna bug #20494

(Browse SVN revision 22410)

pepeto <pepeto>
Project MemberIn charge of this item.
Tue 19 Feb 2013 09:18:18 AM UTC, comment #4:

> I vaguely remember thinking this is finally deciding to leave
> it as it is. Should have added comment at least to remind why
> exactly so. Probably I were afraid of masking some erronous use
> before actual send.


Well, I checked again, I don't see what's wrong in initializing this structure. I plan to commit the patch.

pepeto <pepeto>
Project MemberIn charge of this item.
Sat 16 Feb 2013 09:40:43 PM UTC, comment #3:

dio_put_uint8() reports:

valgrind reports:

pepeto <pepeto>
Project MemberIn charge of this item.
Mon 11 Feb 2013 03:23:07 PM UTC, comment #2:

I don't see what's wrong in initializing this structure to zero. In the same file, function send_connect_route(), memset() is called for the same structure.

pepeto <pepeto>
Project MemberIn charge of this item.
Sun 10 Feb 2013 03:52:51 PM UTC, comment #1:

I vaguely remember thinking this is finally deciding to leave it as it is. Should have added comment at least to remind why exactly so. Probably I were afraid of masking some erronous use before actual send.

Marko Lindqvist <cazfi>
Project Administrator
Sun 10 Feb 2013 03:19:48 PM UTC, original submission:

'base' and 'road' fields are not initialized in send_path_orders(). It results invalid read for sending to the server. Fix attached.

pepeto <pepeto>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one

Digest:
   patch dependencies.

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by pepeto (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 21 Feb 2013 10:02:12 AM UTCpepetoStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Tue 19 Feb 2013 09:18:18 AM UTCpepetoAssigned toNone=>pepeto
      Planned Release=>2.3.5, 2.4.0, 2.5.0
    Sun 10 Feb 2013 03:19:48 PM UTCpepetoAttached File-=>Added goto_unitilialized_packet_fields.diff, #17177
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup