1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 <2017> 2018 2019 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 <2017> 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: string fanout or stringout after conditional check? |
From: | Eric Norum <[email protected]> |
To: | Jeong Han Lee <[email protected]> |
Cc: | [email protected] |
Date: | Thu, 18 May 2017 08:08:45 -0700 |
To guard against buffer overrun issues it’s best to specify a maximum length in the protocol entry: read_raw { in “%39c"; } Or, if the input terminator is set to a single ‘\r’ or ‘\n’ and the device sends a "\r\n” you could use: read_raw { in “%39[^\r\n]"; }
--
Eric Norum [email protected] |