Browse Source

modules/access/live555.cpp: Fix crash parsing H264 config

The buffer allocated for parsing the H264 config string is not
sufficient, causing a possible heap overflow. Size the buffer
more accurately to prevent this happening.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
(cherry picked from commit 6dee6325ec)
pull/135/head
Will Newton 8 years ago
committed by Rémi Denis-Courmont
parent
commit
6754041b56
  1. 2
      modules/access/live555.cpp

2
modules/access/live555.cpp

@ -2353,7 +2353,7 @@ static unsigned char* parseH264ConfigStr( char const* configStr,
}
}
size_t configMax = 5*strlen(dup);
size_t configMax = 4*i_records+strlen(configStr);
unsigned char *cfg = new unsigned char[configMax];
psz = dup;
for( size_t i = 0; i < i_records; ++i )

Loading…
Cancel
Save