+//! maximum size of the rtsp description, must be < INT_MAX
+#define MAX_DESC_BUF (20 * 1024 * 1024)
rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwidth) {
+ // as size is unsigned this also catches the case (size < 0)
+ if (size > MAX_DESC_BUF) {
+ printf("real: Content-length for description too big (> %uMB)!\n",
+ MAX_DESC_BUF/(1024*1024) );
+ xbuffer_free(buf);
+ return NULL;
+ }
+
if (!rtsp_search_answers(rtsp_session,"ETag"))
printf("real: got no ETag!\n");
else
session_id=strdup(rtsp_search_answers(rtsp_session,"ETag"));