Viewing Issue Advanced Details Jump to Notes ] Wiki ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0010941 [DCSS] Bug Report minor always 2017-02-14 16:14 2017-03-12 19:14
Reporter advil View Status public  
Assigned To neil
Priority normal Resolution done Local or Remote Both
Status closed   Operating System All
Projection none   Console or Tiles Both
ETA none Fixed in Branch 0.19 ancient branch Product Branch 0.21 ancient branch
  Product Version since at least 0.12
Summary 0010941: bug in local tiles CPRINTF / _cprintf_touchui
Description This code path calls a printf-like with the output of another printf-like as a format string, so escaped `%%` will get swallowed. At its most innocuous this just doesn't print %s (you can see this on local tiles with the next experience level display, which should have a %), but if you give it something like "%%s" you get "(null)". (I couldn't generate a crash but there may be ways.)

The problem is in _cprintf_touchui, with the chaining of the following two lines (setting aside the small screen stuff):

buf = vmake_stringf(format, args);


and then later

cprintf(buf.c_str());


A hacky quick fix might be to change the latter to
cprintf("%s", buf.c_str());
, but one way or another buf shouldn't be reused as a format strong.
Steps To Reproduce
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0031484)
neil (administrator)
2017-02-14 16:22

Fixed in trunk (0.20-a0-643-gdc5f830) and stable (0.19.4-9-g45fd643), thanks!

- Issue History
Date Modified Username Field Change
2017-02-14 16:14 advil New Issue
2017-02-14 16:22 neil Note Added: 0031484
2017-02-14 16:22 neil Status new => resolved
2017-02-14 16:22 neil Fixed in Branch => 0.19 stable branch
2017-02-14 16:22 neil Resolution open => done
2017-02-14 16:22 neil Assigned To => neil
2017-03-12 19:14 advil Status resolved => closed


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker