Skip to content

Commit

Permalink
Merge branch 'update/circuitV3' into exceptions-circuits-V3
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/credentialAtomicQueryV3.cpp
#	src/credentialAtomicQueryV3OnChain.cpp
  • Loading branch information
demonsh committed Mar 1, 2024
2 parents 3e19c26 + 7ef780a commit 9cb08e3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
Binary file modified src/credentialAtomicQueryV3.dat
Binary file not shown.
Binary file modified src/credentialAtomicQueryV3OnChain.dat
Binary file not shown.
5 changes: 0 additions & 5 deletions src/witnesscalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Circom_Circuit* loadCircuit(const void *buffer, unsigned long buffer_size) {
circuit->InputHashMap = new HashSignalInfo[get_size_of_input_hashmap()];
uint dsize = get_size_of_input_hashmap()*sizeof(HashSignalInfo);
if (buffer_size < dsize) {
//Add this code snippet to prevent potential memory errors.
throw std::runtime_error("Invalid circuit file: buffer_size <= dsize");
}
memcpy((void *)(circuit->InputHashMap), (void *)bdata, dsize);
Expand All @@ -31,7 +30,6 @@ Circom_Circuit* loadCircuit(const void *buffer, unsigned long buffer_size) {
uint inisize = dsize;
dsize = get_size_of_witness()*sizeof(u64);
if (buffer_size < dsize + inisize) {
//Add this code snippet to prevent potential memory errors.
throw std::runtime_error("Invalid circuit file: buffer_size <= dsize + inisize");
}
memcpy((void *)(circuit->witness2SignalList), (void *)(bdata+inisize), dsize);
Expand All @@ -41,7 +39,6 @@ Circom_Circuit* loadCircuit(const void *buffer, unsigned long buffer_size) {
inisize += dsize;
dsize = get_size_of_constants()*sizeof(FrElement);
if (buffer_size < dsize + inisize) {
//Add this code snippet to prevent potential memory errors.
throw std::runtime_error("Invalid circuit file: buffer_size <= dsize + inisize");
}
memcpy((void *)(circuit->circuitConstants), (void *)(bdata+inisize), dsize);
Expand All @@ -53,7 +50,6 @@ Circom_Circuit* loadCircuit(const void *buffer, unsigned long buffer_size) {
inisize += dsize;
dsize = get_size_of_io_map()*sizeof(u32);
if (buffer_size < dsize + inisize) {
//Add this code snippet to prevent potential memory errors.
throw std::runtime_error("Invalid circuit file: buffer_size <= dsize + inisize");
}
memcpy((void *)index, (void *)(bdata+inisize), dsize);
Expand All @@ -62,7 +58,6 @@ Circom_Circuit* loadCircuit(const void *buffer, unsigned long buffer_size) {
throw std::runtime_error("Invalid circuit file: wrong inisize");
}
if (buffer_size <= inisize) {
//Add this code snippet to prevent potential memory errors.
throw std::runtime_error("Invalid circuit file: buffer_size <= inisize");
}
u32 dataiomap[(buffer_size-inisize)/sizeof(u32)];
Expand Down

0 comments on commit 9cb08e3

Please sign in to comment.