summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx.l
diff options
context:
space:
mode:
authortgrogers <[email protected]>2018-10-11 22:15:15 -0400
committertgrogers <[email protected]>2018-10-11 22:15:15 -0400
commit76c878711187cd70e8eb460b8eb392da504e7655 (patch)
tree0396cc7f993766e1ae0e6769572666e6ced35941 /src/cuda-sim/ptx.l
parent982d7e02ff64c8978d5635bbc2b3515e2145574b (diff)
parent68134d5eb326552fc1ef4b02b2eb21103266283b (diff)
Merging the latest dev from the public branch
Diffstat (limited to 'src/cuda-sim/ptx.l')
-rw-r--r--src/cuda-sim/ptx.l4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cuda-sim/ptx.l b/src/cuda-sim/ptx.l
index 5471d6f..af015c9 100644
--- a/src/cuda-sim/ptx.l
+++ b/src/cuda-sim/ptx.l
@@ -36,7 +36,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ptx.tab.h"
#include <string.h>
-char linebuf[1024];
+char linebuf[4096];
unsigned col = 0;
#define TC col+=strlen(ptx_text);
#define CHECK_UNSIGNED \
@@ -382,7 +382,7 @@ breakaddr TC; ptx_lval.int_value = BREAKADDR_OP; return OPCODE;
"//"[^\n]* TC; // eat single
-\n.* col=0; strncpy(linebuf, yytext + 1, 1024); yyless( 1 );
+\n.* col=0; strncpy(linebuf, yytext + 1, sizeof(linebuf)); yyless( 1 );
" " TC;
"\t" TC;