Skip to content

R_igraph_restore_pointer() should validate vertex IDs #829

@szhorvat

Description

@szhorvat

R_igraph_restore_pointer() creates an igraph_t from the R-side representation. After PR #813, this function got some error checking, but a bit more is needed.

On the R side, edge IDs are stored as doubles, which are the same in all platforms we support. However, on the C side, they may be of different types with a smaller range than a double:

  • In C/igraph 0.9, they are doubles, however, some of the igraph code won't work correctly if the values exceed the 32-bit signed integer range
  • In C/igraph 0.10 they can either be 32-bit or 64-bit integers, depending on the platform. 32-bit platforms are still in use, e.g. Raspberry Pi

R_igraph_restore_pointer() should validate that vertex IDs are within the allowed range and will fit the target type that they are being copied to.

@krlmlr @Antonov548

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions