Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The non-GH search version: https://sourcegraph.com/search?q=context:global+repo:%5Egith...

Your observation is proper in that it did not exclude the patterns you mentioned, but in this specific case not necessary because all 4 results are shaped the exact same way:

    lib/Image/ExifTool/Exif.pm

                    #### eval Start ($valuePtr, $val)
                    my $newStart = eval($$subdir{Start});
                    unless (Image::ExifTool::IsInt($newStart)) {
                    #### eval Base ($start,$base)
                    $subdirBase = eval($$subdir{Base}) + $base;
                }

    lib/Image/ExifTool/MakerNotes.pm

                #### eval Start ($valuePtr)
                $newStart = eval($$subdir{Start});
            }
                #### eval Base ($start,$base)
                my $baseShift = eval($$subdir{Base});
                # shift directory base (note: we may do this again below
                #### eval OffsetPt ($valuePtr)
                $ifdOffsetPos = eval($$subdir{OffsetPt}) - $dirStart;
            }


You're right that excluding "eval {" is not necessary because it only occurs in the already excluded subset, but that search link is missing a lot of matches since the space character in my pattern has turned into a plus sign in yours. Try this: https://sourcegraph.com/search?q=context%3Aglobal+repo%3A%5E...

There are also some cases (excluded in this search) where a charset parameter is passed around and eventually passed to eval in the LoadCharset function, e.g. from the RTF parser through the Recompose method. Not sure if that's always safe.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: