Bug 5559 - ri.Printf of the extensions string is potentially larger than the buffer for Com_Printf
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: unspecified
Hardware: All All
: P3 minor
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2012-06-03 01:00 EDT by ensiform
Modified: 2012-10-26 03:27:01 EDT
2 users (show)

See Also:


Attachments
The Patch (1.09 KB, patch)
2012-07-02 22:35 EDT, ensiform

Description ensiform 2012-06-03 01:00:43 EDT
The printf with the extensions string is potentially larger than the buffer can handle, thus not showing all extensions and not able to print the newline at the end.

See: void GfxInfo_f( void ) in tr_init.c

I don't have a way to "Fix" this yet as I'm not sure how you would want to go about going around this the correct way, and still display all possible extensions.
Comment 1 ensiform 2012-06-03 20:29:13 EDT
IMO wouldn't it make more sense to have a non-sized string in the engine that won't truncate for using it for checking extensions, and just send the truncated string to the qvm in glconfig.  Then just use a loop to wrap after x (if not midword) when printing in gfxinfo.
Comment 2 Thilo Schulz 2012-07-01 13:07:18 EDT
please make a patch and reopen, otherwise i don't really care too much about this one
Comment 3 ensiform 2012-07-02 22:35:18 EDT
Created attachment 3246 [details]
The Patch

This works but I don't know if its the best or cleanest way to do it.
Comment 4 ensiform 2012-07-04 13:36:43 EDT
Reopened, patch above.
Comment 5 Zack Middleton 2012-10-26 03:27:01 EDT
Merged fix from Rend2 into original renderer in r2335.