- Limit write length into buffer, and add comment about corner-case
- Use C++11's syntax to explicitly remove private copy and assignment operators
- Use C++11 container loop syntax to shorting a cleanup function
- Fix Bitu printf format type
- Check a pointer prior to dereferencing it
- Prevent writing one-beyond the last index
- Replace strcpy with with helper safe_strcpy, provided by @dreamer - thank you!
- Replace strcat with strncat
- Add constructor intializers for scalars and arrays
- Initialize and replace 0-value pointers with nullptr
- Pass in the buffer length when strncpy'ing into a function variable
Job uses Ubuntu 16.04 to get the widest compatibiity with Linux
distributions.
Snapshot builds are uploaded as job artifacts, but GitHub Actions do not
allow to specify compression program/params yet (everything is forced
into a zip).
Autoconf enforces these files only for GNU projects. ATM these files are
out of date and might be misleading to the users.
As long as we'll not place files with the same names in this repo, git
will automatically update moved files when new commits from SVN will be
merged in.
For releases, it would probably be the best to write our own NEWS.md
file and generate CHANGES.md file out of git log.
The eliminated code removes the (ch == 1) branch, which is scoped
within this if condition: `if (rtype == 2 && ch != 1)`, therefore
the (ch == 1) branch will never be taken.
In the call to decode_residue:
decode_residue(f, residue_buffers, ch, n2, r, do_not_decode);
The channel count is previously intialized as zero and incremented
based on a for-loop (f->channels) plus a conditional,
if (map->chan[j].mux == i). If this doesn't happen then 'ch'
remains zero.
Once inside decode_residue(..), the code has three branches based
on channel count: stereo (ch == 2), mono (ch == 1), and then the
exception if it's neither of those (simple 'else'). It's in here
where a zero-valued 'ch' can be used as the denominator in these
calculations:
int c_inter = z % ch
p_inter = z/ch;
Obviously this 'else' branch is meant for channel counts greater
than two an not for zero channels; so this change simply makes
that branch only valid if (ch > 2).
It didn't work. Coverity classifies all our builds as belonging to the
stream called 'dosbox-staging' and there's no option to change it.
This reverts commit e86e6e353e.
It seems like GitHub badges have some caching issues and they do not
work correctly (I have them showing two contradictory statuses,
depending on tab, no matter if I reload page or not).
This badge is useful link straight to the Coverity report, but Coverity
decides to present the scan results in quite misleading way - mixing
runs from master with runs from other branches.
It's better to show no info at all than to show misleading info.
Link to Coverity scan is accessible in README.md, as a reference [3] in
the comparison table.
GCC helpfully indicates, that:
warning: this ‘if’ clause does not guard (…) this statement, but
the latter is misleadingly indented as if it were guarded by the ‘if’.
Also, improve readability while we're touching these lines.
Previous glyph (Five Spoked Asterisk) looks great on Linux, but as it
turns out seems to be broken everywhere else. Use this opportunity to
point out, that SDL 1.2 in general is not being developed any more.
Also, make a correction:
"DOSBox does indicate support" -> "does not"
This bug was detected via Coverity static analysis:
Variable tempfile going out of scope leaks the storage it points to.
The leak happens when invalid keyboard layout file is being loaded:
$ touch xx.kl
$ dosbox .
C:\>keyb xx