diff
--- a/asn1/snmp/packet-snmp-template.c.old	2010-11-18 22:28:07.000000000 +0100
+++ b/asn1/snmp/packet-snmp-template.c	2010-12-28 20:45:55.000000000 +0100
@@ -1854,9 +1854,9 @@
 	/*****************************************************/
 	/* Now localize the key with the engineID and pass   */
 	/* through SHA to produce final key                  */
-	/* May want to ensure that engineLength <= 32,       */
-	/* otherwise need to use a buffer larger than 72     */
 	/*****************************************************/
+	if (engineLength > 32)
+		engineLength = 32;
 	memcpy(password_buf, key, 20);
 	memcpy(password_buf+20, engineID, engineLength);
 	memcpy(password_buf+20+engineLength, key, 20);
diff
--- a/epan/dissectors/packet-mac-lte.c.old	2010-11-18 22:30:47.000000000 +0100
+++ b/epan/dissectors/packet-mac-lte.c	2010-12-28 20:51:40.000000000 +0100
@@ -1286,7 +1286,7 @@
         /* Finalise length of header tree selection */
         proto_item_set_len(rar_header_ti, offset - start_header_offset);
 
-    } while (extension);
+    } while ((extension) && (number_of_rars < 64));
 
     /* Append summary to headers root */
     proto_item_append_text(rar_headers_ti, " (%u RARs", number_of_rars);
