]>
Commit | Line | Data |
---|---|---|
62aa518a JB |
1 | --- cyrus-sasl-2.1.26/plugins/gssapi.c.orig 2012-11-23 19:03:06.002027748 +0100 |
2 | +++ cyrus-sasl-2.1.26/plugins/gssapi.c 2012-11-23 19:06:07.818690625 +0100 | |
3 | @@ -379,7 +379,7 @@ | |
c29ea386 JR |
4 | } |
5 | ||
6 | if (output_token->value && output) { | |
62aa518a | 7 | - unsigned char * p; |
c29ea386 JR |
8 | + int len; |
9 | ||
10 | ret = _plug_buf_alloc(text->utils, | |
11 | &(text->encode_buf), | |
62aa518a | 12 | @@ -393,13 +393,8 @@ |
c29ea386 JR |
13 | return ret; |
14 | } | |
62aa518a JB |
15 | |
16 | - p = (unsigned char *) text->encode_buf; | |
17 | - | |
c29ea386 JR |
18 | - p[0] = (output_token->length>>24) & 0xFF; |
19 | - p[1] = (output_token->length>>16) & 0xFF; | |
20 | - p[2] = (output_token->length>>8) & 0xFF; | |
21 | - p[3] = output_token->length & 0xFF; | |
22 | - | |
23 | + len = htonl(output_token->length); | |
24 | + memcpy(text->encode_buf, &len, 4); | |
25 | memcpy(text->encode_buf + 4, output_token->value, output_token->length); | |
26 | } | |
27 |