| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Bug #698519 "Invalid XRefStm exits with error"
Just wrap the 'readpdf15xref pop' in a stopped if the user has not set
PDFSTOPONERROR, also add mark/cleartomark to clean up the stack.
|
|
|
|
|
|
|
|
|
|
|
| |
94477 suggests a potential access (as an array pcc[i]) past the singelton
address which could occur if pgs->color_component_map.num_components > 1
Copy the "all" value to an array to prevent the issue.
158386 was a mistake, fixed. Two differences show up with bitrgbtags, but
they look the same to me.
tests_private/comparefiles/Altona_Technical_v20_x4.pdf
tests_private/comparefiles/eci_altona-test-suite-v2_technical2_x4.pdf
|
|
|
|
|
|
|
| |
When testing the return value from ftell() don't assign it to an
unsigned int....
Warning from clang this time
|
|
|
|
|
| |
another place to check that fw is not negative. Missed the fact there
were two instances with the first commit.
|
|
|
|
| |
Check return values from ftell() as well as fseek()
|
|
|
|
| |
Check return values from seek and propagate errors if encountered.
|
|
|
|
|
| |
prevent potential divide by zero errors. Instead, propagate error
return codes.
|
|
|
|
|
|
|
| |
Customer needs 50% gray level with 45 degree Angle and DotShape 8
to be a checkerboard pattern with no stray dots. Add a check to force
the step at 50% to be an even number of dots. Tested for Frequency
from 30 to 150 (at 600 dpi).
|
|
|
|
|
|
|
|
|
|
| |
I don't believe its actually possible to end up at the if (swap)
without setting run, because the few cases in the switch where we
don't set run, we go back to the top, swap the source and texture,
and then do the switch again, so somehow we will end up setting run
But its cheap to initialise it, and it will silence Coverity, and it
guards against any possible future problem.
|
|
|
|
|
|
| |
The fix for coverity ID# 127201 introduced a compiler warning due to an
accessor macro (ctm_only) implicitly adding const. Make the local variable
const, too.
|
|
|
|
| |
Add a cast to make integer division explicit.
|
|
|
|
|
|
| |
No structural changes, just change a couple of pointer type declarations
I think this should satisfy Coverity and there doesn't seem to be any
actual problem here.
|
|
|
|
|
|
|
|
| |
Again we shouldn't be able to get to the flagged code with 'raster'
being uninitialised, because 'data', which is initialised to 0 would
have to be updated, and that would mean raster was updated as well.
But since we already initialise data its cheap to initialise raster too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The comments on clist_end_page() state that it returns negative for an
error, 0 for success and positive for success with a low memory warning.
In fact it always returns 0.
This means we don't conform to the comments, and discard any errors that
occur.
This commit reformats the code to reduce the number of tests and to
store the error codes, as well as adding the potential to return
something other than 0.
|
|
|
|
|
|
| |
Its not obvious whether raster can ever be 0 here, it clearly never is
during our tests, and I think it should not be possible, but just in
case we'll guard the division with a check.
|
|
|
|
|
| |
An error exit would leave 'filter' and 'screen_blur' allocated, and
therefore a memory leak.
|
|
|
|
|
|
|
|
| |
Previous commit fixed the RAW_SCREEN_DUMP=1 case, but broke the normal
case. Also added #ifndef RAW_SCREEN_DUMP around the setting in gen_odrered.h
so that the preprocesor flag could be set via the command line.
Lastly, add base/gen_ordered.h to the Headers section of the .vcproj
|
|
|
|
|
|
| |
In refactoring, I missed that FUL_FILE_NAME_LENGTH was needed if
RAW_SCREEN_DUMP was > 0 (RAW_SCREEN_DUMP is #define'd in genordered.h,
so put the definition there.).
|
|
|
|
|
|
|
| |
Remove a NULL pointer check, there's no possible way the pointer
can be NULL at this point. Or if there is, its because a NULL
pointer was passed in as an argument, and we will seg fault earlier
in this function anyway, so no point in checking it here.
|
|
|
|
|
| |
Guard the dereference of pdht with a NULL pointer test, to avoid a
potential seg fault.
|
|
|
|
| |
Add some error checking
|
|
|
|
|
|
|
|
| |
We can only get back here by jumping to the label 'top'. ymax is not
used between this point and the last 'goto top', and it is then
recalculated before being used.
So the assignment is indeed pointless.
|
|
|
|
|
|
|
|
|
|
| |
We don't need to check if dot_grid.data is NULL.
Testing a == 0 && b == 0 after testing a nd b individually can't be
correct. Test for both being zero first.
In the case of an error, we could attempt to free memory that had not
been allocated. Prevent this by checking dot_level_pos is non-NULL.
|
|
|
|
| |
Forgot to initialise the pointer to NULL before starting.
|
|
|
|
|
|
|
|
|
|
|
|
| |
138751 - The code assumes that a separating device has an ICC profile
but doesn't check. Add a check and return an error if it doesn't.
141130 - initialise a structure member
141131 - check and action return codes
158373 put #if DEBUG round some code that's only present to provide a
breakpoint location in debuggers. (and told Coverity to ignore this)
|
|
|
|
|
| |
NULL pointer check - the code branch above already does so, looks like a simple
ommission
|
|
|
|
| |
Explicitly promote an unsigned char value to a long.
|
|
|
|
|
| |
Fix potential NULL pgs (graphics state) pointer dereference. I suspect this can
never occur, but it's cheap and should silence coverity
|
|
|
|
| |
Remove pointless "upgraded_copypage" code.
|
|
|
|
| |
Explicitly initialise a member of the new 'order' structure.
|
|
|
|
| |
We weren't applying vertical glyph substition (from the gsub table).
|
|
|
|
|
|
| |
Address most of the memory leaks stemming from the use of fontconfig.
In this case, just destroying the fontconfig context.
|
|
|
|
|
|
| |
Only calculate tmline when it will actually be used. The calculation uses
y % tmheight, but only the ETS_RSTYLE_THRESHOLD case is called with
tmheight != 0
|
|
|
|
| |
Check a return value and action it.
|
|
|
|
|
|
|
|
| |
I think its not currently possible to trigger this, as it would require
setting up the device pointer incorrectly before entering this routine.
However Coverity is correct that it appears possible to end up doing
a NULL pointer dereference, so add a guard to maek sure that can't
happen.
|
|
|
|
|
| |
Remove an unnecessary copy of a variable, its unconditionally
overwritten immediately after. Comment that.
|
|
|
|
|
|
|
|
|
| |
We weren't checking the return values from gp_fseek_64 or fstat() and
in a couple of places weren't even able to return an error anyway
(void function).
So check the error returns from the C run-time and add error handling
as required in order too report these.
|
|
|
|
|
| |
We were failing to free a couple of allocated buffers in the event of an
error. The other error test all free both buffers properly.
|
|
|
|
|
| |
Initialise some arrays, these are sparsely populated by the code and
potentially possible to access uninitialised data.
|
|
|
|
|
|
| |
Ray objected to my original change, because the debug output would not
be a valid file. So instead we choose to lose the information that
logbits2 is non-zero and drop the if clause.
|
|
|
|
|
|
|
|
|
| |
The first is a clear typo, the code below this point is the same as the
code modified in this commit.
The second one is less clear, but I think its reasonable, if there is
no '0' (-1 return from next_zero()) then we can't make the feature
larger by darkening to the right, so darken to the left.
|
|
|
|
|
|
|
|
|
|
| |
The macro used here says it shouldn't be used for run-time calculations.
However this code does use it, I'm not certain for what purpose. Since
it clearly is possible to get a negative shift, add a guard to the
values to make sure that can't happen.
Since this code is conditionally compiled out, anyone who compiled it
in and finds a problem can easily fix it.
|
|
|
|
|
|
| |
Check the stored graphics state and if its 0, use the default method.
Remove the now redundant later check on pgs being 0 before use.
|
|
|
|
|
|
|
| |
A number of pointless comparisons, checking that a signed 32-bit variable
had a value less than the maximum for a signed 32-bit integer.
Remove them all.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Return an error instead of storing it (where it gets lost)
As per gdevpsd.c and gdevprf.c refactor the #if conditional compiled
code to remove a variable and get rid of Coverity warning.
In the 'build_cmyk_raster_line_fromplanar* routines, pass the params as
a pointer instead of copying the whole 500+ byte structure around.
Finally, not a Coverity warning but a compiler warning; remove an unused
variable.
|
|
|
|
|
|
|
|
|
|
|
| |
If we get an error from param_read_name, then just return it.
The AddLut lookup is less obvious. Clearly the size of the LUT read from
the config file should not be less than 0, but there's no clear upper
limit (other than an unsigned integer). However a 4Gb config file seems
unlikely. The only example we have has ~23 values for each plane, so a
limit of 256 entries seems reasonable. If anyone complains its easy to
increase and we can ask the user what a reasonable limit should be.
|
|
|
|
|
| |
As with gdevgprf.c, refactor the #if conditional compilation so that we
don't need a variable, and remove the Coverity warning.
|