aboutsummaryrefslogtreecommitdiff
path: root/src/script/common/c_internal.h
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2016-01-08 15:37:11 +0100
committerest31 <MTest31@outlook.com>2016-01-08 15:37:11 +0100
commit57a461930ba13b0b499c334d77e4b6a0aa73606b (patch)
tree1b7f9fe43f55b1fea78f64af794b2c5d00ef8374 /src/script/common/c_internal.h
parent0bbbc6e13dc8180cf1d98f9866bc72a510162eb3 (diff)
downloadminetest-57a461930ba13b0b499c334d77e4b6a0aa73606b.tar.gz
minetest-57a461930ba13b0b499c334d77e4b6a0aa73606b.tar.bz2
minetest-57a461930ba13b0b499c334d77e4b6a0aa73606b.zip
Fix redis error reporting
Previously, we assumed that reply->str was NULL terminated. However, this turned out to be not true, as users reported crashes in strlen connected to where reply->str was appended to an std::string. Use the method recomended by the docs, to read the length separately.
Diffstat (limited to 'src/script/common/c_internal.h')
0 files changed, 0 insertions, 0 deletions
f='#n127'>127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/


/******************************************************************************/
/******************************************************************************/
/* WARNING!!!! do NOT add this header in any include file or any code file    */
/*             not being a script/modapi file!!!!!!!!                         */
/******************************************************************************/
/******************************************************************************/

#ifndef C_CONTENT_H_
#define C_CONTENT_H_

extern "C" {
#include <lua.h>
}

#include <iostream>
#include <map>
#include <vector>

#include "irrlichttypes_bloated.h"
#include "util/string.h"

namespace Json { class Value; }