mirror of https://gerrit.osmocom.org/asn1c
protection from DOS
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1108 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
parent
dfbff8cb66
commit
6f3a88fc0f
|
@ -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 @@ 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;
|
||||
|
|
Loading…
Reference in New Issue