Skip to content

Commit

Permalink
more coverity issues again
Browse files Browse the repository at this point in the history
  • Loading branch information
vlazzarini committed Mar 7, 2017
1 parent d32d1cb commit 4d93465
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Opcodes/sfont.c
Expand Up @@ -2002,8 +2002,10 @@ static int chunk_read(CSOUND *csound, FILE *fil, CHUNK *chunk)
{
if (UNLIKELY(4 != fread(chunk->ckID,1,4, fil)))
return 0;
if (UNLIKELY(1 != fread(&chunk->ckSize,4,1,fil)))
if (UNLIKELY(1 != fread(&chunk->ckSize,4,1,fil))) {
chunk->ckSize = 0;
return 0;
}
ChangeByteOrder("d", (char *)&chunk->ckSize, 4);
chunk->ckDATA = (BYTE *) csound->Malloc(csound, chunk->ckSize);
if (chunk->ckDATA==NULL)
Expand Down
1 change: 1 addition & 0 deletions frontends/CsoundAC/allegro.cpp
Expand Up @@ -2783,6 +2783,7 @@ bool Alg_iterator::remove_next(Alg_events_ptr &events, long &index,


Alg_seq::Alg_seq(const char *filename, bool smf, double *offset_ptr)
: pending(), beat_x(0)
{
basic_initialization();
ifstream inf(filename, smf ? ios::binary | ios::in : ios::in);
Expand Down
2 changes: 1 addition & 1 deletion frontends/csladspa/csladspa.cpp
Expand Up @@ -428,7 +428,7 @@ unsigned int CountCSD(char **csdnames)
src = getenv("LADSPA_PATH");
if (src)
strncpy(ladspa_path, src, 1023);
ladspa_path[1023] = "\0";
ladspa_path[1023] = '\0';
#endif

// if no LADSPA_PATH attempt to open
Expand Down

0 comments on commit 4d93465

Please sign in to comment.