Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
luyikei
VLMC
Commits
424cbdea
Commit
424cbdea
authored
Mar 01, 2014
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VlmcLogger: Check asprintf return
parent
849dbe07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/Tools/VlmcLogger.cpp
src/Tools/VlmcLogger.cpp
+4
-2
No files found.
src/Tools/VlmcLogger.cpp
View file @
424cbdea
...
...
@@ -183,8 +183,10 @@ VlmcLogger::backendLogHandler(void *data, Backend::IBackend::LogLevel logLevel,
{
VlmcLogger
*
self
=
reinterpret_cast
<
VlmcLogger
*>
(
data
);
char
*
newMsg
=
NULL
;
asprintf
(
&
newMsg
,
"[%s] T #%p [Backend] %s"
,
qPrintable
(
QTime
::
currentTime
().
toString
(
"hh:mm:ss.zzz"
)
),
QThread
::
currentThreadId
(),
msg
);
if
(
asprintf
(
&
newMsg
,
"[%s] T #%p [Backend] %s"
,
qPrintable
(
QTime
::
currentTime
().
toString
(
"hh:mm:ss.zzz"
)
),
QThread
::
currentThreadId
(),
msg
)
<
0
)
return
;
if
(
self
->
m_logFile
!=
NULL
)
self
->
writeToFile
(
newMsg
);
if
(
logLevel
<
self
->
m_backendLogLevel
)
...
...
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