summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-05-01 17:16:48 +0000
committerdes <des@FreeBSD.org>2003-05-01 17:16:48 +0000
commit4cb3e2a7ad9c948a1b4c65b504f00c5e4e6292a6 (patch)
tree0abd643e769aac006529ba14f4cd28f34cdf566d /contrib
parent97a771b3d82754567fe52a0df58a9a0b36766ec7 (diff)
parentf1f9c1228ba0058106dd6a76502b853f93ceba5d (diff)
downloadFreeBSD-src-4cb3e2a7ad9c948a1b4c65b504f00c5e4e6292a6.zip
FreeBSD-src-4cb3e2a7ad9c948a1b4c65b504f00c5e4e6292a6.tar.gz
This commit was generated by cvs2svn to compensate for changes in r114438,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/openpam/lib/pam_set_item.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/openpam/lib/pam_set_item.c b/contrib/openpam/lib/pam_set_item.c
index 250d287..aba99fb 100644
--- a/contrib/openpam/lib/pam_set_item.c
+++ b/contrib/openpam/lib/pam_set_item.c
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $P4: //depot/projects/openpam/lib/pam_set_item.c#17 $
+ * $P4: //depot/projects/openpam/lib/pam_set_item.c#18 $
*/
#include <sys/param.h>
@@ -62,6 +62,7 @@ pam_set_item(pam_handle_t *pamh,
if (pamh == NULL)
RETURNC(PAM_SYSTEM_ERR);
slot = &pamh->item[item_type];
+ osize = nsize = 0;
switch (item_type) {
case PAM_SERVICE:
case PAM_USER:
@@ -73,10 +74,10 @@ pam_set_item(pam_handle_t *pamh,
case PAM_USER_PROMPT:
case PAM_AUTHTOK_PROMPT:
case PAM_OLDAUTHTOK_PROMPT:
- if (item != NULL)
- nsize = strlen(item) + 1;
if (*slot != NULL)
osize = strlen(*slot) + 1;
+ if (item != NULL)
+ nsize = strlen(item) + 1;
break;
case PAM_REPOSITORY:
osize = nsize = sizeof(struct pam_repository);
OpenPOWER on IntegriCloud