Skip to content

fix: deserializePlugin ignores serialization length - #69

Draft
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/gwc-volume-plugin-8a0c265e
Draft

fix: deserializePlugin ignores serialization length#69
andrewwhitecdw wants to merge 1 commit into
NVlabs:masterfrom
andrewwhitecdw:bugfix/gwc-volume-plugin-8a0c265e

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

Problem

fix: deserializePlugin ignores serialization length

Fix

Replace:

    nvinfer1::IPluginV2* deserializePlugin(
        char const*,
        void const* serialData,
        size_t serialLength) noexcept override {
        auto* plugin = new FFSGWCVolumePlugin(serialData, serialLength);
        plugin->setPluginNamespace(namespace_.c_str());
        return plugin;
    }

with:

    nvinfer1::IPluginV2* deserializePlugin(
        char const*,
        void const* serialData,
        size_t serialLength) noexcept override {
        if (serialLength != sizeof(GWCParams)) return nullptr;
        auto* plugin = new FFSGWCVolumePlugin(serialData, serialLength);
        plugin->setPluginNamespace(namespace_.c_str());
        return plugin;
    }

Files changed

  • cpp/src/gwc_volume_plugin.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant