2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

1914. [bug] Strings returned from cfg_obj_asstring() should be

treated as read-only.  The prototype for
                        cfg_obj_asstring() has been updated to reflect this.
                        [RT #15256]
This commit is contained in:
Mark Andrews
2005-08-23 02:36:11 +00:00
parent d3195a7f45
commit 4e1d3e67cd
17 changed files with 102 additions and 88 deletions

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: parser.c,v 1.117 2005/04/27 04:57:28 sra Exp $ */
/* $Id: parser.c,v 1.118 2005/08/23 02:36:10 marka Exp $ */
/*! \file */
@@ -806,7 +806,7 @@ cfg_obj_isstring(cfg_obj_t *obj) {
return (ISC_TF(obj->type->rep == &cfg_rep_string));
}
char *
const char *
cfg_obj_asstring(cfg_obj_t *obj) {
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_string);
return (obj->value.string.base);