vak: (Default)
[personal profile] vak posting in [community profile] besm6
Coverity сообщает о потенциальной баге в simh. Правда я не могу понять, чего он хочет.

From: <scan-admin@coverity.com>
Date: Tue, 19 Feb 2019 23:47
Subject: New Defects reported by Coverity Scan for simh/simh
To: <serge@vak.ru>

Hi,

Please find the latest report on new defect(s) introduced to simh/simh found with Coverity Scan.

New defect(s) Reported-by: Coverity Scan

*** CID 1477057:    (TAINTED_SCALAR)
/BESM6/besm6_punch.c: 250 in fs_event()
244                 /* Switching from running text mode to "virtual punchcard" mode and back
245                  * is done with an ASCII GS (group separator) symbol ctrl-].
246                  */
247                 fs_state[num] = FS_IMAGE;
248                 goto again;
249             } else {
>>>     CID 1477057:    (TAINTED_SCALAR)
>>>     Passing tainted variable "ch" to a tainted sink.
250                 FS[num] = unicode_to_upp (ch);
251             }
252         } else if (FS_IMAGE <= fs_state[num] && fs_state[num] <= FS_IMAGE_LAST) {
253             int ch = utf8_getc (u->fileref);
254             if (ch < 0) {
255                 /* premature end of tape */
/BESM6/besm6_punch.c: 271 in fs_event()
265             } else if (ch == (']' & 037)) {
266                 if (fs_state[num] != FS_IMAGE)
267                     besm6_debug("<<< ENDA3 requested mid-card?");
268                 fs_state[num] = FS_ENDA3;
269                 goto again;
270             } else {
>>>     CID 1477057:    (TAINTED_SCALAR)
>>>     Passing tainted variable "ch" to a tainted sink.
271                 FS[num] = unicode_to_upp (ch);
272                 if (++fs_state[num] == FS_TOOLONG) {
273                     /* If a line is too long (> 120 chars), start the next "virtual punchcard" */
274                     fs_state[num] = FS_IMAGE;
275                 }
276             }
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

Сообщество любителей БЭСМ-6

December 2025

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
282930 31   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 15th, 2026 02:33 am
Powered by Dreamwidth Studios