Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002023Inform 6Generalpublic2017-07-16 15:492017-08-16 12:30
Reporterdfremont 
Assigned ToDavidK 
PrioritynormalSeverityseriousReproducibilityalways
StatusresolvedResolutionfixed 
Platformx86OSMac OS XOS Version10.12
Product Version6.32 
Target VersionFixed in Version 
Summary0002023: Verb lengths not checked
DescriptionVerbs are allowed to be arbitrarily long strings (modulo memory limits), but the compiler assumes their lengths fit in a byte, which can cause disaster later on (see example). They should be checked against some reasonable upper limit.

In the example below, a verb with exactly 251 characters causes the compiler to enter an amusing infinite loop (see line 342 of verbs.c; note that unless this line is changed to use unsigned arithmetic like line 319, the length limit will have to be at most 127 characters).
Minimal Source Text To Reproduce
Verb "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 
"foo" "bar" * -> Blob;
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0004706)
zarf (developer)
2017-07-18 07:17

Check. I'll create a hard limit of 127 (a #define, not a settable option).
(0004707)
zarf (developer)
2017-07-18 08:04

Fixed, commit https://github.com/erkyrath/inform6/commit/253dc64a1380277bde73d98429afd46ca36d36e7 [^]

- Issue History
Date Modified Username Field Change
2017-07-16 15:49 dfremont New Issue
2017-07-18 07:17 zarf Note Added: 0004706
2017-07-18 07:17 zarf Assigned To => zarf
2017-07-18 07:17 zarf Status new => confirmed
2017-07-18 08:04 zarf Note Added: 0004707
2017-07-18 08:04 zarf Assigned To zarf => DavidK
2017-07-18 08:04 zarf Status confirmed => assigned
2017-08-16 12:30 DavidK Status assigned => resolved
2017-08-16 12:30 DavidK Resolution open => fixed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker