(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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user