7266155375
The endpoint listSegmentsManually method misses a check for the limit parameter, otherwise it can return inconsistent results when it's 0 or negative. When 0 or negative, without the check, it returns no segments but also that there isn't more segments and that isn't correct. The function is only called from the Endpoint.ListSegments method and the function cares to ensure that limit is always greater than 0, but if the method doesn't check that a new future caller could misuse it and provoke a bug. Additionally: * Documentation for the modified function has been written * The part of the function that repeated the logic of the Endpoint.getPointer method has been removed for using that method. * Added logging before returning an internal error in Endpoint.getPointer. Change-Id: I5c4f0db2292da0162db6b7d63553895808d0925a |
||
---|---|---|
.. | ||
batch.go | ||
config.go | ||
db_test.go | ||
db.go | ||
endpoint_test.go | ||
loop_test.go | ||
loop.go | ||
metainfo_test.go | ||
metainfo.go | ||
service_test.go | ||
service.go | ||
validation.go |