micropython/shared
Jim Mussared 9be0623d4c shared/libc/string0: Don't deref args for n==0 case.
C99 says that strncmp has UB for either string being NULL, so the
current behavior is technically correct, but it's an easy fix to handle
this case correctly.

7.1.4: "unless explicitly stated otherwise in the detailed
description... if an argument to a function has ...null pointer.. the
behavior is undefined".

7.21.1: "Unless explicitly stated otherwise in the description of a
particular function in this subclause, pointer arguments on such a call
shall still have valid values, as described in 7.1.4".

Also make the same change for the minimal version in bare-arm/lib.c.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-11-07 16:01:50 +11:00
..
libc shared/libc/string0: Don't deref args for n==0 case. 2023-11-07 16:01:50 +11:00
memzip py/mkrules.mk: Add rule for compiling auto-generated source files. 2023-11-03 13:57:47 +11:00
netutils shared/netutils/dhcpserver: Reply on correct netif. 2023-09-29 14:53:26 +10:00
readline
runtime py/builtinevex: Handle invalid filenames for execfile. 2023-10-12 15:17:59 +11:00
timeutils
tinyusb rp2/msc_disk: Allow configuring the USB MSC inquiry response. 2023-09-29 16:36:45 +10:00
upytesthelper py/modsys: Allow sys.path to be assigned to. 2023-06-08 17:54:24 +10:00
README.md

README.md

This directory contains libraries, utilities and helper code developed specifically for this project. The code is intended to be portable and usable by any port.