|
@@ -18,5 +18,5 @@ Last-Update: 2017-06-12
|
|
+ }
|
|
+ }
|
|
+
|
|
+
|
|
/* read the frame */
|
|
/* read the frame */
|
|
- if ((ret = read(fd, &buf, caplen)) != caplen) {
|
|
|
|
- if (ret < 0) {
|
|
|
|
|
|
+ maxread = min((size_t)caplen, sizeof(buf));
|
|
|
|
+ if ((ret = read(fd, &buf, maxread)) != maxread) {
|