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 ...
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- 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!
Reply to: Pimps getting creative
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Pimps getting creative"
Collapse
-
Originally posted by NickFitz View PostI'm also getting a warning at
Code:index = strtol(argv[1], NULL, 10);
Maybe they're assuming a 32-bit system?
I did a course on analysing malware last year and every single research paper presented addressed 32 bit only.
Which I thought somewhat odd.
Leave a comment:
-
Originally posted by VectraMan View PostEh? tbl is an array of function pointers that take one argument. So that's fine. I guess try is okay in C because it's a keyword in C++.
Is there more to it than 5?
My C coding days are long behind me, so don't judge too harshly.
Leave a comment:
-
Originally posted by DaveB View Postgcc -m32 is targetting it for a 32 bit system isnt it?
I went from various assembly languages and Forth directly to JavaScript; I never did anything with C, so I only really know as much of it as I need to work in Objective C. Things like gcc command-line options are not within my ambit
As I'm looking at it in Xcode, the warnings will be from clang, so maybe gcc wouldn't mind that bit.
Leave a comment:
-
It outputs the Steam Key for Samantha Fox Strip Poker, can I have my GCHQ code breaker job now please ?
Leave a comment:
-
I'm also getting a warning at
Code:index = strtol(argv[1], NULL, 10);
Maybe they're assuming a 32-bit system?
Leave a comment:
-
Originally posted by NickFitz View PostBTW, Suity is correct about the printf in the try function: GCC gives a warning that there are more placeholders than variables. Obviously, i should also be mentioned in that call
Of course I could be entirely wonrg / out of date.
Leave a comment:
-
Originally posted by NickFitz View PostBTW, Suity is correct about the printf in the try function: GCC gives a warning that there are more placeholders than variables. Obviously, i should also be mentioned in that call
Leave a comment:
-
Originally posted by NickFitz View PostWhen it's first requested from within the page, the Referer (TBL's everlasting spelling mistake) header check on the Disney server results in a 403 Forbidden response. Once you've looked at it in another tab, your browser has cached it. Thus it never makes the request after that, it just shows the cached copy.
This also explains why Suity reckons it's working for him, as obviously he had to have looked at it to get the URL to post it, so he's seeing the copy his own browser has cached.
The rest of us are left quoting T S Eliot:
What are the roots that clutch, what branches grow
Out of this stony rubbish? Son of man,
You cannot say, or guess, for you know only
A heap of broken images…
Did you say that you are still on bench ?!!!
Leave a comment:
-
BTW, Suity is correct about the printf in the try function: GCC gives a warning that there are more placeholders than variables. Obviously, i should also be mentioned in that call
Leave a comment:
-
Originally posted by DaveB View PostWTBS.
Although if I grab the image url from the page properties and load it in a seperate tab, it then appears correctly in the thread.
This also explains why Suity reckons it's working for him, as obviously he had to have looked at it to get the URL to post it, so he's seeing the copy his own browser has cached.
The rest of us are left quoting T S Eliot:
What are the roots that clutch, what branches grow
Out of this stony rubbish? Son of man,
You cannot say, or guess, for you know only
A heap of broken images…
Leave a comment:
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Reports of umbrella companies’ death are greatly exaggerated Yesterday 10:11
- A new hiring fraud hinges on a limited company, a passport and ‘Ade’ Nov 27 09:21
- Is an unpaid umbrella company required to pay contractors? Nov 26 09:28
- The truth of umbrella company regulation is being misconstrued Nov 25 09:23
- Labour’s plan to regulate umbrella companies: a closer look Nov 21 09:24
- When HMRC misses an FTT deadline but still wins another CJRS case Nov 20 09:20
- How 15% employer NICs will sting the umbrella company market Nov 19 09:16
- Contracting Awards 2024 hails 19 firms as best of the best Nov 18 09:13
- How to answer at interview, ‘What’s your greatest weakness?’ Nov 14 09:59
- Business Asset Disposal Relief changes in April 2025: Q&A Nov 13 09:37
Leave a comment: