Open Source Telephony
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [PATCH] Fix: use of g_checksum_get_digest() inout argument
Date: Mon, 29 Mar 2010 18:14:22 -0700	[thread overview]
Message-ID: <1269911662.11714.217.camel@localhost.localdomain> (raw)
In-Reply-To: <1269869914-4662-1-git-send-email-ppessi@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

Hi Pekka,

>  gatchat/ppp_auth.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gatchat/ppp_auth.c b/gatchat/ppp_auth.c
> index fe3c501..1e0c82b 100644
> --- a/gatchat/ppp_auth.c
> +++ b/gatchat/ppp_auth.c
> @@ -107,7 +107,7 @@ static void chap_process_challenge(struct auth_data *auth, guint8 *packet)
>  		response->length = htons(response_length);
>  		response->data[0] = digest_len;
>  		g_checksum_get_digest(checksum, &response->data[1],
> -					(gsize *) &response->data[0]);
> +					&digest_len);
>  		/* leave the name empty? */
>  	}

thanks for the patch. I changed it a bit by moving the data[0]
assignment after the get_digest call to ensure we use the right length
value on the wire. Not that it matters in this case since it is a fixed
length anyway, but just in case.

Regards

Marcel



      reply	other threads:[~2010-03-30  1:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29 13:38 [PATCH] Fix: use of g_checksum_get_digest() inout argument ppessi
2010-03-30  1:14 ` Marcel Holtmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1269911662.11714.217.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox