summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx.l
diff options
context:
space:
mode:
authorMahmoud <[email protected]>2018-10-16 17:26:34 -0400
committerMahmoud <[email protected]>2018-10-16 17:26:34 -0400
commit7375668786abfa5b0592fca0ce97fb5a8ba512d4 (patch)
tree4abf17acab64630f3a099d82e0cd8250c54d7b5f /src/cuda-sim/ptx.l
parent802bc9f840aac536330ad93a1cbc2f04ead75106 (diff)
parentb8db00c3d8cfddb37a96b9cf2f308a67db4d319d (diff)
Merge branch 'dev-purdue-integration' into dev
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;