shell_nlip: trim trailing '\n' on input lines
The base64 decode code was recently changed to reject invalid input.
This broke nlip receive.
The fix is to trim the trailing newline character before passing input
to base64_decode().
@@ -58,6 +58,12 @@ shell_nlip_process(char *data, int len)
struct os_mbuf *m;
uint16_t crc;
+ /* Trim trailing newline. */
+ if (len >= 1 && data[len - 1] == '\n') {
+ data[len - 1] = '\0';
+ len--;
+ }
+
rc = base64_decode(data, data);
if (rc < 0) {
goto err;
