OSDN Git Service
(root)
/
csp-qt
/
common_source_project-fm7.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b89a9da
)
[Qt][LOGGER] copy_log(): Using arg ; start_size.
author
K.Ohta
<whatisthis.sowhat@gmail.com>
Mon, 5 Sep 2016 07:45:20 +0000
(16:45 +0900)
committer
K.Ohta
<whatisthis.sowhat@gmail.com>
Mon, 5 Sep 2016 07:45:20 +0000
(16:45 +0900)
source/src/qt/gui/csp_logger.cpp
patch
|
blob
|
history
diff --git
a/source/src/qt/gui/csp_logger.cpp
b/source/src/qt/gui/csp_logger.cpp
index
0a24d8f
..
3080e0d
100644
(file)
--- a/
source/src/qt/gui/csp_logger.cpp
+++ b/
source/src/qt/gui/csp_logger.cpp
@@
-637,7
+637,9
@@
int64_t CSP_Logger::copy_log(char *buffer, int64_t buf_size, int64_t *lines, cha
int64_t nlines = 0;
int64_t ssize = start_size;
if(ssize < 0) ssize = 0;
- char *p = buffer;
+ if(start_size >= buf_size) return -1;
+
+ char *p = &(buffer[start_size]);
if(line < 0) line = 0;
{