LINUX.ORG.RU

История изменений

Исправление RazrFalcon, (текущая версия) :

Жирный сам по себе. Вот сравнение на реальном конфиге:

YAML

# Integer overflow.
- table: glyf
  glyphs:
    - name: A
      type: contours
      contours:
        - contour:
          - { x: 32767, y: 0 }
          - { x: 65534, y: 0 }
          - { x: 98301, y: 0 }
          - { x: 131068, y: 0 }

XML

<!-- Integer overflow. -->
<tables>
    <table name="glyf">
        <glyphs>
            <glyph name="A" type="contours">
                <contour>
                    <point x="32767" y="0"/>
                    <point x="65534" y="0"/>
                    <point x="98301" y="0"/>
                    <point x="131068" y="0"/>
                </contour>
            </glyph>
        </glyphs>
    </table>
</tables>

JSON5

// Integer overflow.
[
    {
        table: "glyf",
        glyphs: [
            {
                name: "A",
                type: "contours",
                contours: [
                    [
                        { x: 32767, y: 0 },
                        { x: 65534, y: 0 },
                        { x: 98301, y: 0 },
                        { x: 131068, y: 0 },
                    ]
                ]
            }
        ]
    }
]

PS: Тот случай, когда json самый унылый.

Исправление RazrFalcon, :

Жирный сам по себе. Вот сравнение на реальном конфиге:

YAML

# Integer overflow.
- table: glyf
  glyphs:
    - name: A
      type: contours
      contours:
        - contour:
          - { x: 32767, y: 0 }
          - { x: 65534, y: 0 }
          - { x: 98301, y: 0 }
          - { x: 131068, y: 0 }
<!-- Integer overflow. -->
<tables>
    <table name="glyf">
        <glyphs>
            <glyph name="A" type="contours">
                <contour>
                    <point x="32767" y="0"/>
                    <point x="65534" y="0"/>
                    <point x="98301" y="0"/>
                    <point x="131068" y="0"/>
                </contour>
            </glyph>
        </glyphs>
    </table>
</tables>

JSON5

// Integer overflow.
[
    {
        table: "glyf",
        glyphs: [
            {
                name: "A",
                type: "contours",
                contours: [
                    [
                        { x: 32767, y: 0 },
                        { x: 65534, y: 0 },
                        { x: 98301, y: 0 },
                        { x: 131068, y: 0 },
                    ]
                ]
            }
        ]
    }
]

PS: Тот случай, когда json самый унылый.

Исходная версия RazrFalcon, :

Жирный сам по себе. Вот сравнение на реальном конфиге:

YAML

# Integer overflow.
- table: glyf
  glyphs:
    - name: A
      type: contours
      contours:
        - contour:
          - { x: 32767, y: 0 }
          - { x: 65534, y: 0 }
          - { x: 98301, y: 0 }
          - { x: 131068, y: 0 }

JSON5

// Integer overflow.
[
    {
        table: "glyf",
        glyphs: [
            {
                name: "A",
                type: "contours",
                contours: [
                    [
                        { x: 32767, y: 0 },
                        { x: 65534, y: 0 },
                        { x: 98301, y: 0 },
                        { x: 131068, y: 0 },
                    ]
                ]
            }
        ]
    }
]