usbhost_cdcacm: fix tx outbuffer overflow and remove now invalid assert

This commit is contained in:
Janne Rosberg 2017-03-07 06:58:32 -06:00 committed by Gregory Nutt
parent 3331e9c49a
commit ce2845c5c3
1 changed files with 1 additions and 2 deletions

View File

@ -941,7 +941,7 @@ static void usbhost_txdata_work(FAR void *arg)
/* Increment counters and indices */
txndx++;
if (++txtail > txbuf->size)
if (++txtail >= txbuf->size)
{
txtail = 0;
}
@ -1118,7 +1118,6 @@ static void usbhost_rxdata_work(FAR void *arg)
* no interest to us.
*/
DEBUGASSERT(nread <= priv->pktsize);
priv->nrxbytes = (uint16_t)nread;
rxndx = 0;