Merge pull request #3745 from guybe7/unstable

enlarged buffer given to ld2string
This commit is contained in:
Salvatore Sanfilippo
2018-02-13 15:50:21 +01:00
committed by GitHub
3 changed files with 7 additions and 2 deletions

View File

@ -145,7 +145,7 @@ robj *createStringObjectFromLongLong(long long value) {
*
* The 'humanfriendly' option is used for INCRBYFLOAT and HINCRBYFLOAT. */
robj *createStringObjectFromLongDouble(long double value, int humanfriendly) {
char buf[256];
char buf[MAX_LONG_DOUBLE_CHARS];
int len = ld2string(buf,sizeof(buf),value,humanfriendly);
return createStringObject(buf,len);
}