Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ESP32-audioI2S
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ESP32-audioI2S
Commits
5f4cb057
Unverified
Commit
5f4cb057
authored
Jul 03, 2023
by
Wolle
Committed by
GitHub
Jul 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latinToUTF8() bufflen limited
parent
fc89e575
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/Audio.cpp
src/Audio.cpp
+4
-4
src/Audio.h
src/Audio.h
+2
-2
No files found.
src/Audio.cpp
View file @
5f4cb057
...
...
@@ -3,8 +3,8 @@
*
* Created on: Oct 26.2018
*
* Version 3.0.
2g
* Updated on: Ju
n 2
3.2023
* Version 3.0.
3
* Updated on: Ju
l 0
3.2023
* Author: Wolle (schreibfaul1)
*
*/
...
...
@@ -1150,7 +1150,7 @@ bool Audio::latinToUTF8(char* buff, size_t bufflen){
uint16_t
len
=
strlen
(
buff
);
uint8_t
c
;
while
(
pos
<
len
){
while
(
pos
<
len
-
2
){
c
=
buff
[
pos
];
if
(
c
>=
0xC2
)
{
// is UTF8 char
pos
++
;
...
...
@@ -3496,7 +3496,7 @@ bool Audio::parseHttpResponseHeader() { // this is the response to a GET / reque
else
if
(
startsWith
(
rhl
,
"icy-description:"
))
{
const
char
*
c_idesc
=
(
rhl
+
16
);
while
(
c_idesc
[
0
]
==
' '
)
c_idesc
++
;
latinToUTF8
(
rhl
,
sizeof
(
rhl
));
// if already UTF-
0
do nothing, otherwise convert to UTF-8
latinToUTF8
(
rhl
,
sizeof
(
rhl
));
// if already UTF-
8
do nothing, otherwise convert to UTF-8
if
(
specialIndexOf
((
uint8_t
*
)
c_idesc
,
"24bit"
,
strlen
(
c_idesc
))
>=
0
){
AUDIO_INFO
(
"icy-description: %s has to be 8 or 16"
,
c_idesc
);
stopSong
();
...
...
src/Audio.h
View file @
5f4cb057
...
...
@@ -3,8 +3,8 @@
*
* Created on: Oct 28,2018
*
* Version 3.0.
2f
* Updated on: Ju
n 20
.2023
* Version 3.0.
3
* Updated on: Ju
l 03
.2023
* Author: Wolle (schreibfaul1)
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment