URL:
  <http://gna.org/bugs/?20517>

                 Summary: Invalid read of size 4 in ruleset reloading cycle
                 Project: Freeciv
            Submitted by: pepeto
            Submitted on: sam. 16 févr. 2013 22:31:53 CET
                Category: general
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: S2_3, S2_4, trunk
         Discussion Lock: Any
        Operating System: None
         Planned Release: 

    _______________________________________________________

Details:

dio_put_uint8() and valgrid reported a read error in ruleset reloading cycle:

Trying to put 177836256 into 8 bits
Trying to put 177836256 into 8 bits
Trying to put 3331952 into 8 bits
Trying to put 3331952 into 8 bits
Trying to put 1713398619 into 8 bits
Trying to put 1713398619 into 8 bits
Trying to put 1713398619 into 8 bits
Trying to put 1713398619 into 8 bits
Trying to put 1713398619 into 8 bits
Trying to put 1713398619 into 8 bits



==17762== Invalid read of size 4
==17762==    at 0x8196B8B: government_number (government.c:93)
==17762==    by 0x80E20E6: package_player_info (plrhand.c:957)
==17762==    by 0x80E2A4F: send_player_info_c_real (plrhand.c:782)
==17762==    by 0x80E2C00: send_player_info_c (plrhand.c:755)
==17762==    by 0x80F689B: load_rulesetdir (ruleset.c:5061)
==17762==    by 0x80F95DC: load_rulesets (ruleset.c:5069)
==17762==    by 0x808075A: set_rulesetdir (stdinhand.c:3794)
==17762==    by 0x8088E60: handle_stdin_input_real.part.16 (stdinhand.c:4327)
==17762==    by 0x808B50F: read_init_script_real (stdinhand.c:1264)
==17762==    by 0x8088773: handle_stdin_input_real.part.16 (stdinhand.c:1181)
==17762==    by 0x8136374: handle_chat_msg_req (handchat.c:343)
==17762==    by 0x80D6AE3: server_handle_packet (hand_gen.c:40)
==17762==  Address 0x6f76a38 is 0 bytes inside a block of size 1,344 free'd
==17762==    at 0x402B06C: free (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==17762==    by 0x8197C5C: governments_free (government.c:536)
==17762==    by 0x8196304: game_ruleset_free (game.c:521)
==17762==    by 0x80F6866: load_rulesetdir (ruleset.c:5124)
==17762==    by 0x80F95DC: load_rulesets (ruleset.c:5069)
==17762==    by 0x808075A: set_rulesetdir (stdinhand.c:3794)
==17762==    by 0x8088E60: handle_stdin_input_real.part.16 (stdinhand.c:4327)
==17762==    by 0x808B50F: read_init_script_real (stdinhand.c:1264)
==17762==    by 0x8088773: handle_stdin_input_real.part.16 (stdinhand.c:1181)
==17762==    by 0x8136374: handle_chat_msg_req (handchat.c:343)
==17762==    by 0x80D6AE3: server_handle_packet (hand_gen.c:40)
==17762==    by 0x80774C1: server_packet_input (srv_main.c:1579)


Patch attached which fix the problem for me. But I'm scared for secondary
effects.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: sam. 16 févr. 2013 22:31:53 CET  Name: ruleset_reload_player_gov.diff 
Size: 423 o   By: pepeto

<http://gna.org/bugs/download.php?file_id=17223>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?20517>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to