Skip to content
Snippets Groups Projects
Commit 1c0d9f01 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Some especially silly Coverity-induced paranoia.

parent 0711760b
Branches
Tags
No related merge requests found
......@@ -834,7 +834,7 @@ do_xp_play_sample(unsigned char *sampo, size_t sz, int *freed)
int need_copy = 0;
#endif
#ifdef AFMT_U8
int wr;
size_t wr;
int i;
#endif
......@@ -976,12 +976,15 @@ do_xp_play_sample(unsigned char *sampo, size_t sz, int *freed)
#endif
#ifdef AFMT_U8
if(handle_type==SOUND_DEVICE_OSS) {
wr=0;
while(wr<sz) {
i=write(dsp, samp+wr, sz-wr);
if(i>=0)
wr+=i;
if (handle_type == SOUND_DEVICE_OSS) {
wr = 0;
while (wr < sz) {
i = write(dsp, samp + wr, sz - wr);
if (i >= 0) {
if ((SIZE_MAX - i) < wr)
wr = SIZE_MAX;
wr += i;
}
}
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment