Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 78128 | Differences between
and this patch

Collapse All | Expand All

(-)Decrypt.cc.jn (-1 / +8 lines)
Lines 132-144 GBool Decrypt::makeFileKey2(int encVersi Link Here
132
  Guchar *buf;
132
  Guchar *buf;
133
  Guchar test[32];
133
  Guchar test[32];
134
  Guchar fState[256];
134
  Guchar fState[256];
135
  Guchar tmpKey[16];
135
  Guchar *tmpKey;
136
  Guchar fx, fy;
136
  Guchar fx, fy;
137
  int len, i, j;
137
  int len, i, j;
138
  GBool ok;
138
  GBool ok;
139
139
140
  // check whether we have non-zero keyLength
141
  if ( !keyLength ) {
142
    return gFalse;
143
  }
144
  
140
  // generate file key
145
  // generate file key
141
  buf = (Guchar *)gmalloc(68 + fileID->getLength());
146
  buf = (Guchar *)gmalloc(68 + fileID->getLength());
147
  tmpKey = (Guchar *)gmalloc(keyLength * sizeof(Guchar));
142
  if (userPassword) {
148
  if (userPassword) {
143
    len = userPassword->getLength();
149
    len = userPassword->getLength();
144
    if (len < 32) {
150
    if (len < 32) {
Lines 191-196 GBool Decrypt::makeFileKey2(int encVersi Link Here
191
    ok = gFalse;
197
    ok = gFalse;
192
  }
198
  }
193
199
200
  gfree(tmpKey);
194
  gfree(buf);
201
  gfree(buf);
195
  return ok;
202
  return ok;
196
}
203
}

Return to bug 78128