Re: [Groff] Potential buffer overrun in src/roff/troff/input.cpp

2014-09-24 Thread Keith Marshall
On 24/09/14 17:28, Werner LEMBERG wrote: > Honestly, I would like it to be > > // ps_get_line(): collect an input record from a PostScript file. > // ... > // > static > int ps_get_line(char *buf, ... > Okay. That's how I'll do it, then. (FWIW, for MinGW I normally put the comment b

Re: [Groff] Potential buffer overrun in src/roff/troff/input.cpp

2014-09-24 Thread Werner LEMBERG
> Should it rather become: >> // >> // ps_get_line(): collect an input record from a PostScript file. >> // ... >> // >> static >> int ps_get_line(char *buf, ... > > or: >> //** >> // ps_get_line(): collect an input record from a PostScript file. >> // ... >> // >> static >> int p

Re: [Groff] Potential buffer overrun in src/roff/troff/input.cpp

2014-09-24 Thread Keith Marshall
On 24/09/14 10:41, Werner LEMBERG wrote: >>> What is `+ve'? >> >> I've always understood it to be universally accepted -- at least in >> mathematical, scientific, and engineering circles -- as an >> abbreviation for "positive". > > I'm quite firm in reading such stuff, and up to now I've *never* s

Re: [Groff] Potential buffer overrun in src/roff/troff/input.cpp

2014-09-24 Thread Keith Marshall
On 24/09/14 10:41, Werner LEMBERG wrote: >> Should I also s?\*?/?g, on the lead-in to the function header >> comment block, (in addition to introducing each subsequent line with >> the C++ style '//')? > > Even after reading it twice I'm not exactly sure what you mean :-) > Please show an example.

Re: [Groff] Potential buffer overrun in src/roff/troff/input.cpp

2014-09-24 Thread Werner LEMBERG
> Should I also s?\*?/?g, on the lead-in to the function header > comment block, (in addition to introducing each subsequent line with > the C++ style '//')? Even after reading it twice I'm not exactly sure what you mean :-) Please show an example. >>> + * Returns (+ve) number of input character

Re: [Groff] Potential buffer overrun in src/roff/troff/input.cpp

2014-09-24 Thread Keith Marshall
On 24/09/14 05:57, Werner LEMBERG wrote: >> I believe I've matched the existing style of code layout, (which >> isn't entirely to my personal taste), but is the comment style >> acceptable? (I've annotated my changes considerably more >> comprehensively than the original). > > I don't really mind

Re: [Groff] Potential buffer overrun in src/roff/troff/input.cpp

2014-09-23 Thread Werner LEMBERG
> I've identified a potential buffer overrun in the above file; [...] Thanks for catching this. > Okay to commit? Please go on. > I believe I've matched the existing style of code layout, (which > isn't entirely to my personal taste), but is the comment style > acceptable? (I've annotated my

[Groff] Potential buffer overrun in src/roff/troff/input.cpp

2014-09-23 Thread Keith Marshall
Folks, While following up on: http://thread.gmane.org/gmane.comp.printing.groff.general/12353/focus=12368 I've identified a potential buffer overrun in the above file; (it *will* overrun, if function ps_get_line() reads a maximum length line of 255 input characters -- the maximum allowed by the D