Oops! Read a full buffer instead of some spurious number from elswhere.
authorBen Laurie <ben@openssl.org>
Tue, 21 Nov 2000 21:37:48 +0000 (21:37 +0000)
committerBen Laurie <ben@openssl.org>
Tue, 21 Nov 2000 21:37:48 +0000 (21:37 +0000)
demos/state_machine/state_machine.c

index 0140fbca704602d2d38a58dc40ee980f18a4d841..9cede29350631deff1f4dd4c05725b6810489ff6 100644 (file)
@@ -347,7 +347,7 @@ int main(int argc,char **argv)
            }
 
        /* FIXME: we should only extract if stdout is ready */
-       n=SSLStateMachine_read_extract(pMachine,buf,n);
+       n=SSLStateMachine_read_extract(pMachine,buf,sizeof buf);
        if(n < 0)
            {
            SSLStateMachine_print_error(pMachine,"read extract failed");