[Wesnoth-bugs] [bug #25079] UB in font code

2016-11-07 Thread Charles Dang
Update of bug #25079 (project wesnoth):

 Open/Closed:Open => Closed 


___

Reply to this item at:

  

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


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25079] UB in font code

2016-10-22 Thread Wedge009
Update of bug #25079 (project wesnoth):

  Status:  Ready For Test => Fixed  

___

Follow-up Comment #9:

Where else does this happen?

___

Reply to this item at:

  

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


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25079] UB in font code

2016-10-22 Thread Matthias Krüger
Follow-up Comment #8, bug #25079 (project wesnoth):

Can confirm that the one in src/font/text_surface.cpp no longer occurs.

Do you want to keep this open until similar functions are fixed?

___

Reply to this item at:

  

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


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25079] UB in font code

2016-10-21 Thread Wedge009
Follow-up Comment #7, bug #25079 (project wesnoth):

Sorry:
https://github.com/wesnoth/wesnoth/commit/bb436220811a1f53408c77e180ae4e0f23d5b76c

___

Reply to this item at:

  

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


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25079] UB in font code

2016-10-21 Thread Wedge009
Update of bug #25079 (project wesnoth):

  Status:None => Ready For Test 
 Assigned to:None => wedge009   
Operating System:   linux => All

___

Follow-up Comment #6:

Had a super-long work day yesterday so only looked at this just now. Turns out
a similar function is in builder.cpp and uses an unsigned int.

https://github.com/Wedge009/wesnoth/commit/bb436220811a1f53408c77e180ae4e0f23d5b76c

___

Reply to this item at:

  

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


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25079] UB in font code

2016-10-20 Thread Wedge009
Update of bug #25079 (project wesnoth):

  Status: Invalid => None   
 Open/Closed:  Closed => Open   

___

Follow-up Comment #5:

Oh, right. I'll have another look later, then.

___

Reply to this item at:

  

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


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25079] UB in font code

2016-10-20 Thread Daniel
Follow-up Comment #4, bug #25079 (project wesnoth):

Afaik shifting out of range on signed types (unlike unsigned types) is indeed
UB accortudin to the standart, maybe we could fix this by using unsigned types
here.

___

Reply to this item at:

  

___
  Nachricht gesendet von/durch Gna!
  http://gna.org/


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25079] UB in font code

2016-10-20 Thread Wedge009
Update of bug #25079 (project wesnoth):

  Status:None => Invalid
 Open/Closed:Open => Closed 
 Release: git => 1.13.5+dev 

___

Follow-up Comment #3:


void text_surface::hash()
{
int h = 0;
for(const char c : str_) {
h = ((h << 9) | (h >> (sizeof(int) * 8 - 9))) ^ (c);
}
hash_ = h;
}


Seems okay to me, though I'm no expert in hashing functions.

___

Reply to this item at:

  

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


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25079] UB in font code

2016-10-20 Thread Matthias Krüger
Follow-up Comment #2, bug #25079 (project wesnoth):

Still happening (updated log attached).

If it is nothing of relevance feel free to close.

(file #29068)
___

Additional Item Attachment:

File name: font_UB_Oct20th.logSize:7 KB


___

Reply to this item at:

  

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


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25079] UB in font code

2016-10-20 Thread Wedge009
Follow-up Comment #1, bug #25079 (project wesnoth):

Font code has been refactored recently - does this still happen?

Looks like it's a hash function of some sort - wouldn't that mean some
overflow would be expected?

___

Reply to this item at:

  

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


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs


[Wesnoth-bugs] [bug #25079] UB in font code

2016-09-19 Thread Matthias Krüger
URL:
  

 Summary: UB in font code
 Project: Battle for Wesnoth
Submitted by: matthiaskrgr
Submitted on: Mon 19 Sep 2016 01:41:50 PM UTC
Category: Bug
Severity: 3 - Normal
Priority: 5 - Normal
  Item Group: User Interface
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Release: git
Operating System: linux

___

Details:

through several paths it is possible to trigger this UB in font code, the
easiest is to just launch the wesnoth help from the main menu

log attached



___

File Attachments:


---
Date: Mon 19 Sep 2016 01:41:50 PM UTC  Name: UB_font.log  Size: 8kB   By:
matthiaskrgr



___

Reply to this item at:

  

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


___
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs