Commit b386d242 authored by Lev Walkin's avatar Lev Walkin

protection from DOS

parent 5045dfab
/*- /*-
* 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 * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
...@@ -177,7 +178,7 @@ process(const char *fname) { ...@@ -177,7 +178,7 @@ process(const char *fname) {
ber_tlv_len_t frame_size = 0; /* Single frame size */ ber_tlv_len_t frame_size = 0; /* Single frame size */
if(strcmp(fname, "-")) { if(strcmp(fname, "-")) {
fp = fopen(fname, "r"); fp = fopen(fname, "rb");
if(!fp) { if(!fp) {
perror(fname); perror(fname);
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment