We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b03376d commit b097d68Copy full SHA for b097d68
firmware/nand_programmer.c
@@ -385,6 +385,12 @@ static int np_cmd_nand_write_start(np_prog_t *prog)
385
return NP_ERR_ADDR_NOT_ALIGN;
386
}
387
388
+ if (!len)
389
+ {
390
+ ERROR_PRINT("Length is 0\r\n");
391
+ return NP_ERR_LEN_INVALID;
392
+ }
393
+
394
if (len & (prog->chip_info->page_size - 1))
395
{
396
ERROR_PRINT("Length 0x%lx is not aligned to page size 0x%lx\r\n",
@@ -621,6 +627,12 @@ static int _np_cmd_nand_read(np_prog_t *prog)
621
627
622
628
623
629
630
631
632
633
634
635
624
636
625
637
626
638
ERROR_PRINT("Read length 0x%lx is not aligned to page size 0x%lx\r\n",
0 commit comments