Skip to content
Snippets Groups Projects
Commit 15f4d4d4 authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

removed useless files, updated nightly testing to have the right path

Former-commit-id: 15c5a42895dec23a0423df4ad944027ef3ab557a
parent 22bb2996
No related branches found
No related tags found
No related merge requests found
Showing
with 3 additions and 753 deletions
......@@ -21,8 +21,8 @@ main()
cicd_setup_module_dependency allnp/peasoup_umbrella.git
# puts the version of security_transforms to test in peasoup_umbrella/security_transforms
cicd_put_module_in_tree peasoup_umbrella/security_transforms
# puts the version of irdb-libs to test in peasoup_umbrella/irdb-libs
cicd_put_module_in_tree peasoup_umbrella/irdb-libs
# Build/run $PSZ, test result
cd $CICD_MODULE_WORK_DIR/peasoup_umbrella
......
......@@ -5,7 +5,7 @@ trap clean EXIT
cd $CICD_MODULE_WORK_DIR/peasoup_umbrella
source set_env_vars
cd ./security_transforms/tools/selective_cfi/tests/cicd_tests/fib_src
cd ./irdb-libs/tools/selective_cfi/tests/cicd_tests/fib_src
source ../../cfi_smokescreen_configs.sh
......
CC=DO_NOT_USE
CXX=DO_NOT_USE
CFLAGS=DO_NOT_USE
LD=DO_NOT_USE
.SUFFIXES: .o .c .cpp .exe
#exes=dumbledore_cmd.exe test1.exe
#exes=overflow1.exe
#exes=dumbledore_cmd.exe
#exes=unsigned_mul.64.exe
#exes=signed_add.exe
#exes=simpletest.exe
#exes=dummy.exe
#exes=unsigned_mul.64.exe signed_add.exe signed_mul.64.exe signed_mul.32.exe
exes=signed_add.64.exe signed_mul.64.exe unsigned_mul.64.exe signed_mul.32.exe
exes=trunc.64.32.signed.exe trunc.64.32.unsigned.exe trunc.64.16.signed.exe trunc.64.16.unsigned.exe trunc.64.8.signed.exe trunc.64.8.unsigned.exe
exes=trunc.32.16.signed.exe trunc.32.16.unsigned.exe
exes=trunc.32.16.signed.exe
exes=trunc.64.32.signed.exe
#exes=trunc.64.16.unknown.exe
#exes=trunc.64.8.unknown.exe
#exes=trunc.16.8.unsigned.exe
#exes=signedness.32.exe
exes=unsigned_mul.32.exe
all: env_check ${exes}
.PHONY: env_check
.o.exe:
gcc -g $< -o $@
# gcc -m32 $< -o $@
${PEASOUP_HOME}/tools/ps_analyze.sh $@ $@.peasoup --step integertransform=on --step-option integertransform:--instrument-idioms --step-option integertransform:--saturate
.c.o:
gcc -c $<
# gcc -c -m32 $<
.cpp.o:
${PEASOUP_HOME}/tools/ps_comp++.sh $<
env_check:
@echo checking env vars; \
if [ "X${TOOLCHAIN}" = "X" ]; then \
echo TOOLCHAIN environment variable should be set.; \
exit -1;\
elif [ "X${STRATA}" = "X" ]; then \
echo STRATA environment variable should be set. ;\
exit -1;\
elif [ "X${SMPSA_HOME}" = "X" ]; then \
echo SMPSA_HOME environment variable should be set.; \
exit -1;\
elif [ "X${PEASOUP_HOME}" = "X" ]; then \
echo PEASOUP_HOME environment variable should be set.; \
exit -1;\
elif [ "X${STRATA_HOME}" = "X" ]; then \
echo STRATA_HOME environment variable should be set.; \
exit -1;\
fi ;
clean:
rm -f *.o *.syms *.map
rm -f *.exe *.exe.peasoup *.dis *.data *.idb *.log *.ncexe *.readelf temp.* *.temp *.stratafied *.asm *.SMPobjdump *.id0 *.id1 *.til *.nam
rm -Rf concolic.files_*
rm -Rf peasoup_executable_directory.*
rm -f strata.log.*
rm -f *.sym
rm -f *.peasoup
rm -f *.tmp.* tmp.*
cleandb:
${PEASOUP_HOME}/tools/db/drop_my_tables.sh
${PEASOUP_HOME}/tools/db/pdb_setup.sh
concclean:
rm -Rf concolic.files_*
rm strata.log.*
CC=DO_NOT_USE
CXX=DO_NOT_USE
CFLAGS=DO_NOT_USE
LD=DO_NOT_USE
.SUFFIXES: .o .c .cpp .exe
exes=idiom18.exe
all: env_check ${exes}
.PHONY: env_check
.o.exe:
gcc -g $< -o $@
# gcc -m32 $< -o $@
${PEASOUP_HOME}/tools/ps_analyze.sh $@ $@.peasoup --step integertransform=on --step-option integertransform:--instrument-idioms --step-option integertransform:--check-pointers
.c.o:
gcc -O2 -c $<
# gcc -c -m32 $<
.cpp.o:
${PEASOUP_HOME}/tools/ps_comp++.sh $<
env_check:
@echo checking env vars; \
if [ "X${TOOLCHAIN}" = "X" ]; then \
echo TOOLCHAIN environment variable should be set.; \
exit -1;\
elif [ "X${STRATA}" = "X" ]; then \
echo STRATA environment variable should be set. ;\
exit -1;\
elif [ "X${SMPSA_HOME}" = "X" ]; then \
echo SMPSA_HOME environment variable should be set.; \
exit -1;\
elif [ "X${PEASOUP_HOME}" = "X" ]; then \
echo PEASOUP_HOME environment variable should be set.; \
exit -1;\
elif [ "X${STRATA_HOME}" = "X" ]; then \
echo STRATA_HOME environment variable should be set.; \
exit -1;\
fi ;
clean:
rm -f *.o *.syms *.map
rm -f *.exe *.exe.peasoup *.dis *.data *.idb *.log *.ncexe *.readelf temp.* *.temp *.stratafied *.asm *.SMPobjdump *.id0 *.id1 *.til *.nam
rm -Rf concolic.files_*
rm -Rf peasoup_executable_directory.*
rm -f strata.log.*
rm -f *.sym
rm -f *.peasoup
rm -f *.tmp.* tmp.*
cleandb:
${PEASOUP_HOME}/tools/db/drop_my_tables.sh
${PEASOUP_HOME}/tools/db/pdb_setup.sh
concclean:
rm -Rf concolic.files_*
rm strata.log.*
/*
- Description
This small creates a random valued array whose size is specified by user. Besides, it returns a specific element by request as long as the posision is smaller than the size.
- Sample input & Expected result
- ./a.out
invalid inputs
- ./a.out 0x40
invalid inputs
- ./a.out 100 120
index overflow
- ./a.out 100 20
return Array[20]
- ./a.out 100 -3
Element -3: ? (index underflow, not handled)
- ./a.out 100 0xf0000001
Segmentation fault
- Potential Problem
unsigned integer overflow
*/
#include <stdlib.h>
#include <malloc.h>
int main(int argc, char* argv[])
{
int size;
int pos;
int i;
char *buf;
char *ptr = NULL;
if(argc != 3)
{
printf("invalid arguments!\n");
return -1;
}
size = strtoul(argv[1],&ptr, 0);
pos = strtoul(argv[2],&ptr, 0);
fflush(stdout);
buf=(char*)malloc(size * sizeof(char));
printf("Requested position: %d\n", pos);
fflush(stdout);
if(!buf)
{
printf("Allocation failure!\n");
return -1;
}
for(i = 0; i < size; i ++ )
buf[i] = (i * 50) %255;
fflush(stdout);
if(pos < size)
printf("Element %d: %c\n",pos, buf[pos]);
else
printf("Index Overflow\n");
return 0;
}
/*
- Description:
This program compares a user-specified value with 100, and then keeps decreasing the input value for 5 times.
- Sample input
- ./a.out
expected output: Invalid Arguments
- ./a.out 10 100
expected output: Invalid Arguments
- ./a.out 10
expected output: 10 is no larger than 100, -40 is larger than 100
- ./a.out 1000
expected output: all larger than 100
- Potential vulnerability
integer overflow
*/
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
int main(int argc, char* argv[])
{
unsigned int cap;
int i = 0;
if(argc != 2)
{
printf("Invalid Arguments\n");
return -1;
}
cap = atoi(argv[1]);
for(; i < 5; i ++)
{
if(cap <= 100)// compiler emits unsigned comparison code here, but cap is signed
printf("%d is no larger than 100\n", cap);
else
printf("%d is larger than 100\n",cap);
cap -= 50;
}
return 0;
}
/*
- Description
This small program's goal is to allocate space for an array of structures based on a usersupplied argument.
It then fills the structures with data and performs whatever other operations are necessary on that data.
- Sample input & Expected result
- ./a.out
invalid argument
- ./a.out 100 1000
invalid argument
- ./a.out 100
enough space allocated, blocks declared;
- ./a.out 0x40
enough space allocated, blocks declared;
- ./a.out 0x40000001
*** not enough space allocated, segmentation fault;
- Potential Problem
unsigned integer overflow
*/
#include <stdlib.h>
#include <stdio.h>
struct thing {
char buf[100];
int i;
};
int main(int argc, char* argv[])
{
unsigned int num; //user defined size
unsigned int space; //total space to allocate
char *ptr = NULL;
struct thing *records = NULL;
int i = 0;
if (argc != 2) //argument check
{
printf("invalid value\n");
return -1;
}
num = strtoul(argv[1],&ptr, 0);
if (*ptr != '\0') //argument check
{
printf("invalid value\n");
return -1;
}
printf("Memory allocated: %u\n",(num *sizeof(struct thing)));
fflush(stdout);
space = num *sizeof(struct thing); //calculate total space to allocate (unsigned integer overflow) POTENTIAL OVERFLOW HERE
printf("Total size: %u\n", space);
fflush(stdout);
if ((records = (struct thing *)malloc(space)) == NULL) //allocation check
{
printf("Error allocating storage for %u records\n",num);
return -1;
}
for(i = num - 1; i >= 0; i --) //block declare
{
printf("Block %d has been declared\n", i);
(*(records + i)).i = i;
}
printf("%d blocks have been declared\n", num - i - 1);
fflush(stdout);
free(records);
return 0;
}
/*
- Description:
This program copies the data of one area to another area. The size is specified by user.
- Sample input
- ./a.out
invalid argument
- ./a.out 10 10
invalid argument
- ./a.out 10
expected output: Memory operation done!
- ./a.out 2049
size overflow
- ./a.out 0
expected output: Segmentation fault
- ./a.out -1
size overflow
- Potential vulnerability
integer overflow
*/
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
int func(unsigned int cbSize)
{
if (cbSize < 1024)
{
char *buf1 = malloc(sizeof(char)*(cbSize-1));
char *buf2 = malloc(sizeof(char)*(cbSize-1));
memcpy(buf1,buf2,cbSize-1);
printf("Memory operation done!\n");
fflush(stdout);
return 1;
}
else
{
printf("size overflow!\n ");
fflush(stdout);
return 0;
}
}
int main(int argc, char* argv[])
{
if(argc != 2)
{
printf("Invalid Arguments\n");
return -1;
}
func(atoi(argv[1]));
return 0;
}
/*
- Description:
This program create a user-specified array and initializes the value with 0;
- Sample input
- ./a.out
invalid argument
- ./a.out 10 10
invalid argument
- ./a.out 10
expected output: Memory operation done!
- ./a.out 2049
size overflow
- ./a.out 0
expected output: Segmentation fault
- ./a.out -1
size overflow
- Potential vulnerability
integer overflow
*/
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
int func(size_t cbSize)
{
if (cbSize < 1024)
{
char *buf = malloc(sizeof(char)*(cbSize-1));
memset(buf,0,cbSize-1);
printf("Memory operation done!\n");
fflush(stdout);
return 1;
}
else
{
printf("size overflow!\n ");
fflush(stdout);
return 0;
}
}
int main(int argc, char* argv[])
{
if(argc != 2)
{
printf("Invalid Arguments\n");
return -1;
}
func(atoi(argv[1]));
return 0;
}
#include <iostream>
using namespace std;
class A {
public:
A(char *p) { m_string = string(p); }
A(string s) { m_string = s; }
std::string getString() { return m_string; }
~A() { m_string = ""; }
private:
std::string m_string;
};
class B : public A {
public:
B(string s) : A(s) { m_x = 1;} ;
void C() { throw std::exception(); }
protected:
int m_x;
};
main()
{
A a("hello");
std::string world("world");
B b("world");
cerr << a.getString() << endl;
cout << b.getString() << endl;
try {
b.C();
} catch (...)
{
cerr << "exception caught" << endl;
}
}
/*
* Copyright (c) 2013, 2014 - University of Virginia
*
* This file may be used and modified for non-commercial purposes as long as
* all copyright, permission, and nonwarranty notices are preserved.
* Redistribution is prohibited without prior written consent from the University
* of Virginia.
*
* Please contact the authors for restrictions applying to commercial use.
*
* THIS SOURCE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* Author: University of Virginia
* e-mail: jwd@virginia.com
* URL : http://www.cs.virginia.edu/
*
*/
#include <stdio.h>
#include <limits.h>
int main() {
unsigned short us15, us15copy;
signed short s15copy, s15inccopy, s16trunc;
unsigned int us17;
signed int sneg1;
int count;
printf("Enter 32767 to trigger errors of signedness and overflow, smaller otherwise.\n");
printf("Enter unsigned short value: ");
count = scanf("%hu", &us15);
printf("\n");
if (count != 1) printf("\nINPUT ERROR\n");
if (32768 > (us15 + 1)) { /* Conditional branch here implies unsigned */
printf("Bypassing signedness and overflow errors.\n");
}
else if (32767 == us15) {
printf("Preparing to trigger signedness and overflow errors.\n");
}
else {
printf("Preparing to trigger signedness error.\n");
}
s15copy = us15;
printf("Input value: %hu Signed copy: %hd\n ", us15, s15copy);
++s15copy; /* OVERFLOW ERROR */
++us15copy; /* Check for overflow, but no error */
printf("Signed short gets unsigned value: %hd\n", us15copy);
s15inccopy = us15copy; /* SIGNEDNESS ERROR */
printf(" (Overflow) Signed copy then increment: %hd\n", s15copy);
printf(" (Signedness) Increment then signed copy: %hd\n", s15inccopy);
printf("\nEnter -1 to trigger underflow, positive int otherwise: ");
count = scanf("%d", &sneg1);
if (count != 1) printf("\nINPUT ERROR\n");
printf("\n");
if (-1 < sneg1) { /* Conditional branch here implies signed */
printf("Bypassing underflow error.\n");
}
else if (-1 == sneg1) {
printf("Preparing to trigger underflow error.\n");
}
sneg1 -= INT_MAX; /* underflow check should occur, but no error. */
printf("Value minus INT_MAX = %d\n", sneg1);
--sneg1; /* UNDERFLOW ERROR */
printf(" (Underflow) Value minus INT_MAX minus 1 = %d\n", sneg1);
printf("\nEnter 131071 to trigger truncation, small positive int otherwise: ");
count = scanf("%u", &us17);
if (count != 1) printf("\nINPUT ERROR\n");
printf("\n");
if (65536 > us17) { /* Conditional branch here implies unsigned */
printf("Bypassing truncation error.\n");
}
else if (131071 == us17) {
printf("Preparing to trigger truncation error.\n");
}
s16trunc = us17; /* TRUNCATION ERROR */
printf("Unsigned value = %u\n", us17);
printf(" (Truncation) Value copied to signed short = %hd\n", s16trunc);
return 0;
}
*** PEASOUP: 32bit Sign error detected at: 0x0 nextPC:0xf0001a50 esp:0xbf979d1c eax:0xbf979c9c ebx:0xbf979b8c ecx:0xf480e8 edx:0x2 POLICY: controlled exit
*** PEASOUP: 32bit Sign error detected at: 0x0 nextPC:0xf0001a40 esp:0xbf979d1c eax:0xbf979c9c ebx:0xbf979b8c ecx:0xf480e8 edx:0x2 POLICY: controlled exit
*** PEASOUP: 32bit Sign error detected at: 0x0 nextPC:0xf0001a90 esp:0xbf979d1c eax:0xbf979c9c ebx:0xbf979b8c ecx:0x0 edx:0x8000 POLICY: controlled exit
*** PEASOUP: Add/Sub overflow detected at: 0x8049909 nextPC:0xf0001aa0 esp:0xbf979d1c eax:0x0 ebx:0xbf979b90 ecx:0x4 edx:0x8000 POLICY: controlled exit
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
syslog:x:101:103::/home/syslog:/bin/false
messagebus:x:102:107::/var/run/dbus:/bin/false
avahi-autoipd:x:103:110:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false
avahi:x:104:111:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
couchdb:x:105:113:CouchDB Administrator,,,:/var/lib/couchdb:/bin/bash
speech-dispatcher:x:106:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/sh
usbmux:x:107:46:usbmux daemon,,,:/home/usbmux:/bin/false
haldaemon:x:108:114:Hardware abstraction layer,,,:/var/run/hald:/bin/false
kernoops:x:109:65534:Kernel Oops Tracking Daemon,,,:/:/bin/false
pulse:x:110:115:PulseAudio daemon,,,:/var/run/pulse:/bin/false
rtkit:x:111:117:RealtimeKit,,,:/proc:/bin/false
saned:x:112:118::/home/saned:/bin/false
hplip:x:113:7:HPLIP system user,,,:/var/run/hplip:/bin/false
gdm:x:114:120:Gnome Display Manager:/var/lib/gdm:/bin/false
jdh8d:x:1000:1000:peasoupvm2,,,:/home/jdh8d:/bin/bash
sshd:x:115:65534::/var/run/sshd:/usr/sbin/nologin
buildbot:x:116:65534:BuildBot system user,,,:/var/lib/buildbot:/bin/false
postgres:x:117:123:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
File deleted
#!/bin/sh
/home/jdh8d/peasoup/uva/security_transforms.trunk/libtransform/tests/false_positives/peasoup_executable_directory.cat.shared.orig.32523/ps_run.sh /home/jdh8d/peasoup/uva/security_transforms.trunk/libtransform/tests/false_positives/peasoup_executable_directory.cat.shared.orig.32523 "$@"
*** PEASOUP: Add/Sub overflow detected at: 0x804ff27 nextPC:0xf0000dd0 esp:0xbfebd8fc eax:0x1a ebx:0xbfebd800 ecx:0xffffffff edx:0xbfebd9a4 POLICY: controlled exit
*** PEASOUP: Add/Sub overflow detected at: 0x804bc71 nextPC:0xf0001970 esp:0xbfebd7fc eax:0x9258328 ebx:0xbfebd7d0 ecx:0x77 edx:0xbfebd9ac POLICY: controlled exit
*** PEASOUP: Add/Sub overflow detected at: 0x804bc71 nextPC:0xf0001970 esp:0xbfebd49c eax:0x9258328 ebx:0xbfebd470 ecx:0x77 edx:0xb786a694 POLICY: controlled exit
*** PEASOUP: Add/Sub overflow detected at: 0x8055130 nextPC:0xf0001f10 esp:0xbfebd37c eax:0xb724381c ebx:0xbfebd330 ecx:0xb7243814 edx:0xb7243810 POLICY: controlled exit
*** PEASOUP: Add/Sub overflow detected at: 0x8055165 nextPC:0xf0001f30 esp:0xbfebd3cc eax:0xbfebd220 ebx:0xbfebd380 ecx:0x3 edx:0xb7243804 POLICY: controlled exit
*** PEASOUP: Add/Sub overflow detected at: 0x8055130 nextPC:0xf0001f10 esp:0xbfebd3cc eax:0xb724381c ebx:0xbfebd380 ecx:0xb72437fc edx:0xb72437f8 POLICY: controlled exit
*** PEASOUP: Add/Sub overflow detected at: 0x8055130 nextPC:0xf0001f10 esp:0xbfebd3cc eax:0xb724381c ebx:0xbfebd380 ecx:0xb72437f0 edx:0xb72437ec POLICY: controlled exit
*** PEASOUP: Add/Sub overflow detected at: 0x8055130 nextPC:0xf0001f10 esp:0xbfebd3cc eax:0xb724381c ebx:0xbfebd380 ecx:0xb72437e4 edx:0xb72437e0 POLICY: controlled exit
*** PEASOUP: Add/Sub overflow detected at: 0x8055165 nextPC:0xf0001f30 esp:0xbfebd41c eax:0xbfebd270 ebx:0xbfebd3d0 ecx:0x3 edx:0xb72437d4 POLICY: controlled exit
*** PEASOUP: Add/Sub overflow detected at: 0x8055130 nextPC:0xf0001f10 esp:0xbfebd3cc eax:0xb724381c ebx:0xbfebd380 ecx:0xb72437cc edx:0xb72437c8 POLICY: controlled exit
*** PEASOUP: Add/Sub overflow detected at: 0x8055165 nextPC:0xf0001f30 esp:0xbfebd41c eax:0xbfebd260 ebx:0xbfebd3d0 ecx:0x3 edx:0xb72437bc POLICY: controlled exit
bin
boot
cdrom
dev
etc
home
initrd.img
initrd.img.old
lib
lost+found
media
mnt
opt
proc
root
sbin
selinux
srv
sys
tmp
usr
var
vmlinuz
vmlinuz.old
File deleted
#!/bin/sh
/home/jdh8d/peasoup/uva/security_transforms.trunk/libtransform/tests/false_positives/peasoup_executable_directory.ls.shared.orig.803/ps_run.sh /home/jdh8d/peasoup/uva/security_transforms.trunk/libtransform/tests/false_positives/peasoup_executable_directory.ls.shared.orig.803 "$@"
#include <stdio.h>
#include <stdlib.h>
#define MAX_SIZE 100
struct foobar {
int x;
int y;
};
/*
int foobar(struct foobar *myarray, struct foobar *(myarray2d[2][MAX_SIZE/2]))
{
int i, j;
int sum = 0;
for (i = 0; i < 2; ++i)
for (j = 0; j < MAX_SIZE/2; ++j)
{
(*myarray2d)[i][j] = myarray[i * 2 + j];
sum += myarray2d[i][j];
}
return sum;
}
*/
int main(int argc, char **argv)
{
struct foobar myarray[MAX_SIZE];
// struct foobar myarray2d[2][MAX_SIZE/2];
struct foobar* ptr = myarray;
int i;
unsigned long long z = 100;
int index = 1;
if (argc > 1)
z = strtoull(argv[1], NULL, 10);
for (index = i = z * z; ; i*=z, i++)
{
printf("i = %d, index = %d\n", i, index);
index += z;
ptr[index].x = i;
}
/*
for (i = 0; i < 2; ++i)
for (j = 0; j < z/2; ++j)
myarray2d[i][j] = ptr[i * 2 + j];
*/
// int x = foobar(&myarray, &myarray2d);
// printf("x = %d\n", x);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment