summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx.l
diff options
context:
space:
mode:
authorGuillermo Julián <[email protected]>2015-07-10 14:05:33 +0200
committerGuillermo Julián <[email protected]>2015-07-10 14:05:33 +0200
commit2dee85bd4e7558e190880e2ade20764131945569 (patch)
tree2f7080bb0d396ca17bfd5164b45fd99cc2640d45 /src/cuda-sim/ptx.l
parentc6a19233a5cbf3ee2f89fbd54a0a2eb9375d4ca0 (diff)
Increase line buffer size
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 dfed936..98d0b6c 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 \
@@ -370,7 +370,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;