28 lines
909 B
Plaintext
28 lines
909 B
Plaintext
$OpenBSD: patch-egg_egg-hkdf_c,v 1.1 2012/10/24 07:04:03 ajacoutot Exp $
|
|
|
|
From ce0f9c79382830a50d19f0d66d1997476950074a Mon Sep 17 00:00:00 2001
|
|
From: Xi Wang <xi.wang@gmail.com>
|
|
Date: Mon, 22 Oct 2012 20:09:46 +0000
|
|
Subject: Fix incorrect loop condition in egg_hkdf_perform()
|
|
|
|
--- egg/egg-hkdf.c.orig Wed Sep 19 11:01:27 2012
|
|
+++ egg/egg-hkdf.c Wed Oct 24 08:32:31 2012
|
|
@@ -39,7 +39,7 @@ egg_hkdf_perform (const gchar *hash_algo, gconstpointe
|
|
gpointer buffer = NULL;
|
|
gcry_md_hd_t md1, md2;
|
|
guint hash_len;
|
|
- guchar i;
|
|
+ gint i;
|
|
gint flags, algo;
|
|
gsize step, n_buffer;
|
|
guchar *at;
|
|
@@ -89,7 +89,7 @@ egg_hkdf_perform (const gchar *hash_algo, gconstpointe
|
|
gcry_md_reset (md2);
|
|
gcry_md_write (md2, buffer, n_buffer);
|
|
gcry_md_write (md2, info, n_info);
|
|
- gcry_md_write (md2, &i, 1);
|
|
+ gcry_md_putc (md2, i);
|
|
|
|
n_buffer = hash_len;
|
|
memcpy (buffer, gcry_md_read (md2, algo), n_buffer);
|