• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Pimps getting creative

5.00 star(s)
I'm also getting a warning at

Code:
index = strtol(argv[1], NULL, 10);

"Implicit conversion loses integer precision: 'long' to 'int'"

Maybe they're assuming a 32-bit system? :eyes

That wouldn't surprise me.

I did a course on analysing malware last year and every single research paper presented addressed 32 bit only.

Which I thought somewhat odd.
 
Not sure what the rules of the challenge were ...

But I modified the code to:

1) include i in the printf statement in function try
2) changed the <= FTBL_LEN to < FTBL_LEN in the error/boundary check section

Call program with 5 as argument i.e. index=5 to invoke goal function which outputs the same address as the pointer stored in tbl[5].

I'll get my coat ...
 

Advertisers

Back
Top