"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/verity/rs_decode_char.c" between
cryptsetup-2.3.6.tar.xz and cryptsetup-2.4.0.tar.xz

About: cryptsetup is a utility used to conveniently setup disk encryption based on the dm-crypt kernel module. These include plain dm-crypt volumes, LUKS volumes, loop-AES and TrueCrypt compatible format.

rs_decode_char.c  (cryptsetup-2.3.6.tar.xz):rs_decode_char.c  (cryptsetup-2.4.0.tar.xz)
skipping to change at line 28 skipping to change at line 28
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this file; if not, write to the Free Software * License along with this file; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "rs.h" #include "rs.h"
#define MAX_NR_BUF 256
int decode_rs_char(struct rs* rs, data_t* data) int decode_rs_char(struct rs* rs, data_t* data)
{ {
int deg_lambda, el, deg_omega, syn_error, count; int deg_lambda, el, deg_omega, syn_error, count;
int i, j, r, k; int i, j, r, k;
data_t q, tmp, num1, num2, den, discr_r; data_t q, tmp, num1, num2, den, discr_r;
/* FIXME: remove VLAs here */ data_t lambda[MAX_NR_BUF], s[MAX_NR_BUF]; /* Err+Eras Locator poly and sy
data_t lambda[rs->nroots + 1], s[rs->nroots]; /* Err+Eras Locator poly an ndrome poly */
d syndrome poly */ data_t b[MAX_NR_BUF], t[MAX_NR_BUF], omega[MAX_NR_BUF];
data_t b[rs->nroots + 1], t[rs->nroots + 1], omega[rs->nroots + 1]; data_t root[MAX_NR_BUF], reg[MAX_NR_BUF], loc[MAX_NR_BUF];
data_t root[rs->nroots], reg[rs->nroots + 1], loc[rs->nroots];
if (rs->nroots >= MAX_NR_BUF)
return -1;
memset(s, 0, rs->nroots * sizeof(data_t)); memset(s, 0, rs->nroots * sizeof(data_t));
memset(b, 0, (rs->nroots + 1) * sizeof(data_t)); memset(b, 0, (rs->nroots + 1) * sizeof(data_t));
/* form the syndromes; i.e., evaluate data(x) at roots of g(x) */ /* form the syndromes; i.e., evaluate data(x) at roots of g(x) */
for (i = 0; i < rs->nroots; i++) for (i = 0; i < rs->nroots; i++)
s[i] = data[0]; s[i] = data[0];
for (j = 1; j < rs->nn - rs->pad; j++) { for (j = 1; j < rs->nn - rs->pad; j++) {
for (i = 0; i < rs->nroots; i++) { for (i = 0; i < rs->nroots; i++) {
 End of changes. 2 change blocks. 
5 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)