Skip to content

Commit

Permalink
Add buffer scanning limit fix from [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
chad-iris committed Mar 15, 2022
1 parent d75ac26 commit a2b177d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2022.074: version 2.7RC
- Add buffer scanning limit fix from [email protected].

2020.048:
- Support M SEED quality code.
- Fix segfault in sl_msr_print() when no record passed.
Expand Down
4 changes: 2 additions & 2 deletions libslink.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
extern "C" {
#endif

#define LIBSLINK_VERSION "2.7.0" /**< libslink version */
#define LIBSLINK_RELEASE "2020.046" /**< libslink release date */
#define LIBSLINK_VERSION "2.7.0RC" /**< libslink version */
#define LIBSLINK_RELEASE "2022.074" /**< libslink release date */

/** @defgroup seedlink-connection SeedLink Connection */
/** @defgroup connection-state Connection State */
Expand Down
4 changes: 2 additions & 2 deletions slutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ sl_collect (SLCD *slconn, SLpacket **slpack)

/* Stop processing if the buffer contains miniSEED but not enough data */
if (slconn->stat->slpack.reclen == 0 ||
(slconn->stat->slpack.reclen > 0 && slconn->stat->slpack.reclen > bufferlen))
(slconn->stat->slpack.reclen > 0 && slconn->stat->slpack.reclen + SLHEADSIZE > bufferlen))
{
break;
}
Expand Down Expand Up @@ -633,7 +633,7 @@ sl_collect_nb_size (SLCD *slconn, SLpacket **slpack, int maxrecsize)

/* Stop processing if the buffer contains miniSEED but not enough data */
if (slconn->stat->slpack.reclen == 0 ||
(slconn->stat->slpack.reclen > 0 && slconn->stat->slpack.reclen > bufferlen))
(slconn->stat->slpack.reclen > 0 && slconn->stat->slpack.reclen + SLHEADSIZE > bufferlen))
{
break;
}
Expand Down

0 comments on commit a2b177d

Please sign in to comment.