diff options
author | Kevin Greenan <kmg@box.com> | 2015-07-12 09:34:17 -0700 |
---|---|---|
committer | Kevin Greenan <kmg@box.com> | 2015-07-12 09:34:17 -0700 |
commit | 73d7914f1b5c5a94fc646a680c588629adc63197 (patch) | |
tree | ce6dbae80762befa91e246eda0a1c0bb2a87e3cb /src/erasurecode_preprocessing.c | |
parent | 0d876a2ef1dfec5f78b8bc6bb656a37a60d6cc0e (diff) | |
download | liberasurecode-73d7914f1b5c5a94fc646a680c588629adc63197.tar.gz |
This fixes a bug discovered when passing a new insufficient fragments exception
up through Python.
The code that preprocesses decoded fragments to see if it can simply concat
the data fragments instead of decodeing was not properly deduping fragments,
which leads to a failed assertion.
This properly dedups fragments in the fragments_to_string function.
Diffstat (limited to 'src/erasurecode_preprocessing.c')
-rw-r--r-- | src/erasurecode_preprocessing.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/erasurecode_preprocessing.c b/src/erasurecode_preprocessing.c index e23b028..06fd1cc 100644 --- a/src/erasurecode_preprocessing.c +++ b/src/erasurecode_preprocessing.c @@ -323,7 +323,7 @@ int fragments_to_string(int k, int m, continue; } else { /* Make sure we account for duplicates */ - if (NULL != fragments[index]) { + if (NULL == data[index]) { data[index] = fragments[i]; num_data++; } |