1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
From: Niko Tyni <ntyni@debian.org>
Date: Mon, 5 Aug 2024 16:50:56 +0100
X-Dgit-Generated: 1.00-2 fe76997d50267530dd5a5f73995d11987547ac4d
Subject: Fix SASL_SSF and SASL_MAXOUTBUF property handling
sasl_getprop() returns a pointer which needs to be dereferenced to get
the actual value.
Bug-Debian: https://bugs.debian.org/1075146
---
diff --git a/XS.xs b/XS.xs
index eaeef7e..d6d6f4b 100755
--- a/XS.xs
+++ b/XS.xs
@@ -1883,7 +1883,7 @@ PPCODE:
break;
case SASL_SSF:
case SASL_MAXOUTBUF:
- XPUSHi((long int)value);
+ XPUSHi(*((IV *)value));
break;
#ifdef SASL2
case SASL_IPLOCALPORT:
diff --git a/t/plain.t b/t/plain.t
index 6776cf6..4730905 100755
--- a/t/plain.t
+++ b/t/plain.t
@@ -1,7 +1,7 @@
use strict;
use Authen::SASL qw(XS); # Only use XS plugin
-use Test::Simple tests => 5;
+use Test::Simple tests => 6;
our $me;
require "t/common.pl";
@@ -38,6 +38,9 @@ sleep(1);
print $conn->listmech("","|",""),"\n";
+ my $ssf = $conn->property('ssf');
+ ok($ssf == 0, "security strength factor $ssf is zero as expected");
+
sendreply( $conn->server_start( getreply(\*FROM_CLIENT) ),\*TO_CLIENT );
ok(1);
|