Skip to content

Commit 6c92a13

Browse files
authored
[core] Fix crash when enable heavy log and socket id less than 10 (Haivision#2619).
1 parent dd19eac commit 6c92a13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: srtcore/core.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9729,7 +9729,7 @@ int srt::CUDT::checkLazySpawnTsbPdThread()
97299729
#if ENABLE_HEAVY_LOGGING
97309730
std::ostringstream tns1, tns2;
97319731
// Take the last 2 ciphers from the socket ID.
9732-
tns1 << m_SocketID;
9732+
tns1 << setfill('0') << setw(2) << m_SocketID;
97339733
std::string s = tns1.str();
97349734
tns2 << "SRT:TsbPd:@" << s.substr(s.size()-2, 2);
97359735
const string thname = tns2.str();

0 commit comments

Comments
 (0)