isc_buffer_putmem() takes an unsigned char as its second argument but a literal

string is of type char, so a couple of different OSs were complaining.
The 2nd parameter to isc_buffer_putmem() should probably be a const void *,
but rather than deal with changing the API and whatever that implies
with regard to versioning and whatever else, I have instead worked around
the issue by using isc_buffer_putuint8() to add a NUL to the buffer in
the two places that isc_buffer_putmem(&b, "", 1) was used.
This commit is contained in:
David Lawrence
2000-08-02 20:27:14 +00:00
parent 6a976322f0
commit 9805b668b7
+3 -3
View File
@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signzone.c,v 1.86 2000/08/02 13:51:02 bwelling Exp $ */
/* $Id: dnssec-signzone.c,v 1.87 2000/08/02 20:27:14 tale Exp $ */
#include <config.h>
@@ -528,7 +528,7 @@ importparentsig(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
check_result(result, "dns_name_totext()");
if (isc_buffer_availablelength(&b) == 0)
fatal("name '%s' is too long", nametostr(name));
isc_buffer_putmem(&b, "", 1);
isc_buffer_putuint8(&b, 0);
result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone,
dns_db_class(db), 0, NULL, &newdb);
check_result(result, "dns_db_create()");
@@ -611,7 +611,7 @@ haschildkey(dns_db_t *db, dns_name_t *name) {
check_result(result, "dns_name_totext()");
if (isc_buffer_availablelength(&b) == 0)
fatal("name '%s' is too long", nametostr(name));
isc_buffer_putmem(&b, "", 1);
isc_buffer_putuint8(&b, 0); /* Add a NUL. */
result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone,
dns_db_class(db), 0, NULL, &newdb);
check_result(result, "dns_db_create()");