You have FIVE major problems that will break your code, but for now I'll only tell you about the first one, which is causing the seg fault. This one:
argv11 is a string (sometimes a string with length 1, but still a string) and isdigit() is meant to be used with single chars, not strings:
if(!(isdigit(argv[1])))
return 5;
After fixing that, your program will start, but enter an infinite loop. (EDIT: your comment suggests you've fixed it, so I'll tackle the next problem)
EDIT: explaining the integer overflow:
bi.biHeight can be positive or negative, see MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/dd183376(v=vs.85).aspx
Now look at:
bi.biSizeImage = (bi.biWidth * sizeof(RGBTRIPLE) + padding) * bi.biHeight;
See that "bi.biSizeImage" up there has a chance of being negative, because the variable "bi.biHeight" can also be negative.
As the error you're receiving indicates unsigned integer overflow, let's guess that "bi.biSizeImage" is an unsigned long. An unsigned long cannot represent negative numbers, so, long story short to not burden you with low level details: via arithmetic conversion (you can read about it herehere) bi.biHeight will become a huge positive integer instead of a negative integer.
Then (bi.biWidth * sizeof(RGBTRIPLE) + padding)
* bi.biHeight;
will be some number multiplied by this now huge number of bi.biHeight, and that will be too big to fit even an unsigned long.
TL;DR: you need to use the absolute value of bi.biHeight.
After fixing that, you'll get a problem regarding skipping the wrong padding. (EDIT: you've solved that by yourself now. Congratulations.)
After fixing that, you'll get a problem related to not using fseek() to go back to the start of the line after the iteration of a certain loop.
EDIT: you've almost solved that by yourself now
But you're setting "int seek" initially to zero, but the image doesn't start at zero! It starts only after the headers, right? So if you use seek = 0, you'll be going all the way back to the beginning of inptr and writing it's headers to the outfile all over again most likely. Your initial value for seek must account for the header. (hint: maybe use ftell() ? ) –
I think that sums it all up.