File ortp-0.20.0-bz#1005212-bounds-checking.patch of Package ortp

--- ortp-0.20.0/src/payloadtype.c	2014-01-22 16:20:53.674072448 +0100
+++ ortp-0.20.0/src/payloadtype_patched.c	2014-01-22 16:19:48.000000000 +0100
@@ -263,6 +263,14 @@ PayloadType * rtp_profile_get_payload_fr
 }
 
 int rtp_profile_move_payload(RtpProfile *prof,int oldpos,int newpos){
+	if (oldpos<0 || oldpos>=RTP_PROFILE_MAX_PAYLOADS) {
+		ortp_error("Bad old pos index %i",oldpos);
+		return -1;
+	}
+	if (newpos<0 || newpos>=RTP_PROFILE_MAX_PAYLOADS) {
+		ortp_error("Bad new pos index %i",newpos);
+		return -1;
+	}
 	prof->payload[newpos]=prof->payload[oldpos];
 	prof->payload[oldpos]=NULL;
 	return 0;
openSUSE Build Service is sponsored by