View | Details | Raw Unified
Collapse All | Expand All

(-) Decrypt.cc.jn (-1 / +8 lines)
 Lines 132-144   GBool Decrypt::makeFileKey2(int encVersi Link Here 
  Guchar *buf;
  Guchar *buf;
  Guchar test[32];
  Guchar test[32];
  Guchar fState[256];
  Guchar fState[256];
  Guchar tmpKey[16];
  Guchar *tmpKey;
  Guchar fx, fy;
  Guchar fx, fy;
  int len, i, j;
  int len, i, j;
  GBool ok;
  GBool ok;
  // check whether we have non-zero keyLength
  if ( !keyLength ) {
    return gFalse;
  }
  
  // generate file key
  // generate file key
  buf = (Guchar *)gmalloc(68 + fileID->getLength());
  buf = (Guchar *)gmalloc(68 + fileID->getLength());
  tmpKey = (Guchar *)gmalloc(keyLength * sizeof(Guchar));
  if (userPassword) {
  if (userPassword) {
    len = userPassword->getLength();
    len = userPassword->getLength();
    if (len < 32) {
    if (len < 32) {
 Lines 191-196   GBool Decrypt::makeFileKey2(int encVersi Link Here 
    ok = gFalse;
    ok = gFalse;
  }
  }
  gfree(tmpKey);
  gfree(buf);
  gfree(buf);
  return ok;
  return ok;
}
}