protection from DOS


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1108 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/asn1c/unber.c b/asn1c/unber.c
index 2176131..5617611 100644
--- a/asn1c/unber.c
+++ b/asn1c/unber.c
@@ -1,5 +1,6 @@
 /*-
- * Copyright (c) 2004, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2004, 2005, 2006 Lev Walkin <vlm@lionet.info>.
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -177,7 +178,7 @@
 	ber_tlv_len_t frame_size = 0;		/* Single frame size */
 
 	if(strcmp(fname, "-")) {
-		fp = fopen(fname, "r");
+		fp = fopen(fname, "rb");
 		if(!fp) {
 			perror(fname);
 			return -1;