From 6f3a88fc0f6b3c4083286b8fa8c895e0ba5ab56e Mon Sep 17 00:00:00 2001 From: vlm Date: Mon, 27 Mar 2006 21:40:26 +0000 Subject: [PATCH] protection from DOS git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1108 59561ff5-6e30-0410-9f3c-9617f08c8826 --- asn1c/unber.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/asn1c/unber.c b/asn1c/unber.c index 21761312..56176119 100644 --- a/asn1c/unber.c +++ b/asn1c/unber.c @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2004, 2005 Lev Walkin . All rights reserved. + * Copyright (c) 2004, 2005, 2006 Lev Walkin . + * 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 @@ process(const char *fname) { 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;