Skip to content

Commit baa6453

Browse files
committed
Update url.cpp
1 parent c61af64 commit baa6453

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/utils/convert/url.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ void decode(const char* src, uint16_t len, String& dest) {
6363
if (c != '%') {
6464
dest += (c == '+') ? ' ' : c;
6565
} else {
66-
if (src == end) return;
66+
if (end - src < 2) return;
6767
char c1 = *src++;
68-
if (src == end) return;
6968
char c2 = *src++;
7069
dest += char(_decodeNibble(c2) | (_decodeNibble(c1) << 4));
7170
}

0 commit comments

Comments
 (0)