- prevent buffer overflow when reading uart data

- uart data length updated to 256

git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@98 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
schlaepfer
2006-01-20 14:59:46 +00:00
parent 81186d1170
commit 66c971de9e
2 changed files with 3 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ MODULE UsbTargLog;
BEGIN
done := USB.UART0_read(data, length);
IF done THEN
length := MIN(length, USB.MAX_UART_DATA_LENGTH );
FOR i := 0 TO length - 1 DO
logWriter.WriteChar(data[i])
END