(DES_cfb64_encrypt): add asserts that the *num pointers is >= 0,

because if it is, its a programmer error.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17065 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-14 14:19:36 +00:00
parent 562667c187
commit ab8354ee2f

View File

@@ -52,6 +52,7 @@ RCSID("$Id$");
#include <stdlib.h>
#include <string.h>
#include <krb5-types.h>
#include <assert.h>
#include "des.h"
#include "ui.h"
@@ -514,6 +515,7 @@ DES_cfb64_encrypt(const void *in, void *out,
if (forward_encrypt) {
int i = *num;
assert(i >= 0);
while (length > 0) {
if (i == 0)
@@ -535,6 +537,7 @@ DES_cfb64_encrypt(const void *in, void *out,
} else {
int i = *num;
unsigned char c;
assert(i >= 0);
while (length > 0) {
if (i == 0) {