summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-10-09 23:58:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:42 -0500
commit9d26f044a34bbc53a7621c7343cdcbbc752f99ac (patch)
tree51bc4ec037fc177a1ea611f412ee6059543eb701 /source4
parent6ac94532bc3adc3473c9a6411a1e7d4cdcbed7f5 (diff)
downloadsamba-9d26f044a34bbc53a7621c7343cdcbbc752f99ac.tar.gz
samba-9d26f044a34bbc53a7621c7343cdcbbc752f99ac.tar.bz2
samba-9d26f044a34bbc53a7621c7343cdcbbc752f99ac.zip
r2883: set BOOL to the internal values not the wire ones
metze (This used to be commit ad7b0385cfdb989d69a5c42c21fdaf8cd816999e)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/util/asn1.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c
index 138ae930e3..15d9243acd 100644
--- a/source4/libcli/util/asn1.c
+++ b/source4/libcli/util/asn1.c
@@ -241,8 +241,14 @@ BOOL asn1_write_BOOLEAN(ASN1_DATA *data, BOOL v)
BOOL asn1_read_BOOLEAN(ASN1_DATA *data, BOOL *v)
{
+ uint8_t tmp = 0;
asn1_start_tag(data, ASN1_BOOLEAN);
- asn1_read_uint8(data, (uint8 *)v);
+ asn1_read_uint8(data, &tmp);
+ if (tmp == 0xFF) {
+ *v = True;
+ } else {
+ *v = False;
+ }
asn1_end_tag(data);
return !data->has_error;
}