Fix #1676, take one byte more in data-segment...
authorPhilipp Tölke <toelke@in.tum.de>
Mon, 18 Apr 2011 14:42:39 +0000 (14:42 +0000)
committerPhilipp Tölke <toelke@in.tum.de>
Mon, 18 Apr 2011 14:42:39 +0000 (14:42 +0000)
src/vpn/gnunet-service-dns.c

index d7c35d0dd44d1f60ecb8a33d98c29c3ab848ff16..0dd58027a1fce86b0e328b81ecfc49c423f961c7 100644 (file)
@@ -240,7 +240,7 @@ send_rev_query(void * cls, const struct GNUNET_SCHEDULER_TaskContext *tc) {
     dque->class = htons(1); /* IN */
 
     char* anname = (char*)(dpkt->data+(query_states[id].namelen)+sizeof(struct dns_query_line));
-    memcpy(anname, (char[]){0xc0, 0x0c}, 2);
+    memcpy(anname, "\xc0\x0c", 2);
 
     struct dns_record_line *drec_data = (struct dns_record_line*)(dpkt->data+(query_states[id].namelen)+sizeof(struct dns_query_line)+2);
     drec_data->type = htons(12); /* AAAA */
@@ -344,7 +344,7 @@ receive_dht(void *cls,
     dque->class = htons(1); /* IN */
 
     char* anname = (char*)(dpkt->data+(query_states[id].namelen)+sizeof(struct dns_query_line));
-    memcpy(anname, (char[]){0xc0, 0x0c}, 2);
+    memcpy(anname, "\xc0\x0c", 2);
 
     struct dns_record_line *drec_data = (struct dns_record_line*)(dpkt->data+(query_states[id].namelen)+sizeof(struct dns_query_line)+2);
     drec_data->type = htons(28); /* AAAA */