Follow-up Comment #1, bug #16453 (project freeciv):

I cannot reproduce nor can I see what could cause this by reading the source
code. Maybe you are picking macro named saved_state somewhere and variable
name saved_state gets replaced with that...

However, I notice that there is another dangerous cast there in line 4489:
entry_int_get(pentry, FC_ENUM_PTR(saved_state))
entry_int_get() writes sizeof(int) bytes to space allocated for sizeof(enum
with max value 4). Latter might be only 1 byte.
When adding casts, think carefully why you are throwing safety net like type
safety away! Is it because you have broken something, and you have to force
compiler to accept your error?

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

Reply via email to