projects
/
libs
/
core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c8af8a2
)
Variable length arrays on stack are not valid C++
author
Mikko Rasa
<tdb@tdb.fi>
Mon, 16 Jul 2012 23:24:52 +0000
(
02:24
+0300)
committer
Mikko Rasa
<tdb@tdb.fi>
Mon, 16 Jul 2012 23:24:52 +0000
(
02:24
+0300)
source/time/timezone.cpp
patch
|
blob
|
history
diff --git
a/source/time/timezone.cpp
b/source/time/timezone.cpp
index a755954b43628c9f66fb407f46b527fb7a54314f..a2cd7a3f772743c7fe9ac06fde3042fd6ab28d98 100644
(file)
--- a/
source/time/timezone.cpp
+++ b/
source/time/timezone.cpp
@@
-61,7
+61,7
@@
TimeZone get_local_timezone()
long typecnt = get_long(ptr);
long charcnt = get_long(ptr);
int size = timecnt*5+typecnt*6+isgmtcnt+isstdcnt+leapcnt*8+charcnt;
- char
buf
[size];
+ char
*buf = new char
[size];
len = read(fd, buf, size);
if(len==size)
{
@@
-91,6
+91,7
@@
TimeZone get_local_timezone()
name = ptr+abbrind;
}
+ delete[] buf;
}
close(fd);